abarret / multiphase-stokes

Solver a mixture of fluids based on IBAMR
1 stars 0 forks source link

Set parameters via functions #18

Closed abarret closed 1 year ago

abarret commented 1 year ago

This creates functions to set constants (C, D, eta, nu, xi, etc). Also allows a database to be provided in the constructor to read them.

Note that the correct C and D values MUST be provided for the system to make sense (i.e., if you want to invert the system, C and D should probably have alternate signs). The values of C and D are set via the chosen time stepping scheme. For example, for backward Euler, C = 1.0/dt, D = -1.0. For trapezoidal rule, C = 1.0/dt, D = -0.5.

abarret commented 1 year ago

For something like the trapezoidal rule, the operator that we want to invert would have C = 1.0/dt, D = -0.5. But the RHS of the system would include an operator that would have C = 1.0/dt, D = +0.5.