generators.brownian
Data - Generators - Brownian¤
BrownianMotionParams
dataclass
¤
Bases: StepperParams
Parameters for Brownian motion
:param gamma: the damping factor \(\gamma\) of the Brownian motion.
:param delta_t: the minimum time step \(\Delta t\).
:param force_densities: the stochastic force densities, e.g.
[GaussianNoise
][eerily.generators.utils.noise.GaussianNoise].
:param initial_state: the initial velocity \(v(0)\).
:param variable_names: variable names of the given initial condition
Source code in eerily/generators/brownian.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
BrownianMotionStepper
¤
Bases: BaseStepper
Calculates the next step in a brownian motion.
Brownian Motion
Macroscopically, Brownian Motion can be described by the notion of random forces on the particles,
where \(v(t)\) is the velocity at time \(t\) and \(R(t)\) is the stochastic force density from the reservoir particles.
To simulate it numerically, we rewrite
as
Example Code
guassian_force = GaussianForce(mu=0, std=1, seed=seed)
bm_params = BrownianMotionParams(
gamma=0, delta_t=0.1, force_densities=guassian_force, initial_state=np.array([0]),
variable_names=["v"]
)
bms = BrownianMotionStepper(
model_params = bm_params
)
next(bms)
:param model_params: a dataclass that contains the necessary parameters for the model.
e.g., BrownianMotionParams
Source code in eerily/generators/brownian.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
|