PyMPDATA
PyMPDATA copied to clipboard
API: introduce equation-specific solvers that are able to handle systems of eq's.
logic for computing advector field from momentum scalar fields and extrapolating it in time to t+1/2 would be part of it
- some parallelism control here?
Current plan of refactoring PyMPDATA to include multiple solvers able to handle systems of eq's and enable reusable solver components.
classDiagram
Advection --|> FluidDynamics
Advection --|> BlackScholesMerton
BlackScholesMerton --|> BSMAmerican
BlackScholesMerton --|> BSMEuropean
FluidDynamics --|> Burgers
FluidDynamics --|> ShallowWater
FluidDynamics --|> Buoyant
Buoyant --|> Boussinesq
Buoyant --|> Anelastic
class Advection {
+MPDATA options
+Jacobian of coordinate transformation
+Diffusion (ON/OFF)
+Dimensionality (1D, 2D, 3D)
+System size (1eq, 2eq, ...)
+Right hand side terms
+RHS Integrator (euler_a, euler_b, trapez)
}
class FluidDynamics {
+Velocity interpolation
+Velocity extrapolation (ON/OFF)
+Momentum source terms (Coriolis, Immersed boundary)
}
class Burgers {
+...
}
class ShallowWater {
+Batimetry
}
class Buoyant {
+Poisson solver type
+Subgrid dynamics (Implicit LES, Smagoliński, ...)
}
class Boussinesq {
+...
}
class Anelastic {
+...
}
class BlackScholesMerton {
+Averaging type
}
class BSMEuropean {
+BSM equality
}
class BSMAmerican {
+BSM inequality
}
LIttle TODO list:
- [ ] PR with support for multiple equations in current Solver
- [ ] Implement velocity interpolation class
- [ ] Think about constructors (what parameters do we need?)
- [ ] Future implementations (Anelastic, Burgers)
- [ ] add an
__init__flag enabling/disabling checks for CFL condition