A set of solvers for OpenTidalFarm
opentidalfarm.solvers.coupled_sw_solver.
CoupledSWSolver
(problem, solver_params)[source]¶The coupled solver solves the shallow water equations as a fully coupled system with a \(\theta\)-timestepping discretization.
For a opentidalfarm.problems.steady_sw.SteadySWProblem
, it solves
\(u\) and \(\eta\) such that:
For a opentidalfarm.problems.multi_steady_sw.MultiSteadySWProblem
,
it solves \(u^{n+1}\) and \(\eta^{n+1}\) for each timelevel
(including the initial time) such that:
For a opentidalfarm.problems.sw.SWProblem
, and given an initial
condition \(u^{0}\) and \(\eta^{0}\) it solves \(u^{n+1}\) and
\(\eta^{n+1}\) for each timelevel such that:
with \(\theta \in [0, 1]\) and \(u^{n+\theta} := \theta u^{n+1} + (1-\theta) u^n\) and \(\eta^{n+\theta} := \theta \eta^{n+1} + (1-\theta) \eta^n\).
Furthermore:
Some terms, such as the advection or the diffusion term, may be deactivated in the problem specification.
The resulting equations are solved with Newton-iterations and the linear
problems solved as specified in the dolfin_solver setting in
CoupledSWSolverParameters
.
default_parameters
()[source]¶Return the default parameters for the CoupledSWSolver
.
opentidalfarm.solvers.coupled_sw_solver.
CoupledSWSolverParameters
[source]¶A set of parameters for a CoupledSWSolver
.
Following parameters are available:
Variables: |
|
---|
opentidalfarm.solvers.ipcs_sw_solver.
IPCSSWSolver
(problem, parameters)[source]¶This incremental pressure correction scheme (IPCS) is an operator splitting scheme that follows the idea of Goda [1] and Simo [2]. This scheme preserves the exact same stability properties as Navier-Stokes and hence does not introduce additional dissipation in the flow (FIXME: needs verification).
The idea is to replace the unknown free-surface with an approximation. This is chosen as the free-surface solution from the previous solution.
The time discretization is done using a \(\theta\)-scheme, the convection, friction and divergence are handled semi-implicitly. Thus, we have a discretized version of the shallow water equations as
where \(\square^{n+\theta} = \theta{\square}^{n+1}+(1-\theta)\square^n, \theta \in [0, 1]\) and \(u^* = \frac{3}{2}u^n - \frac{1}{2}u^{n-1}\).
This convection term is unconditionally stable, and with \(\theta=0.5\), this equation is second order in time and space [2] (FIXME: Needs verification).
For the operator splitting, we use the free-surface solution from the previous timestep as an estimation, giving an equation for a tentative velocity, \(\tilde{u}^{n+1}\):
This tenative velocity does not satisfy the divergence equation, and thus we define a velocity correction \(u^c=u^{n+1}-\tilde{u}^{n+1}\). Substracting the second equation from the first, we see that
The operator splitting is a first order approximation, \(O(\Delta t)\), so we can, without reducing the order of the approximation simplify the above to
which is reducible to the problem:
The corrected velocity is then easily calculated from
Remarks:
- This solver only works with transient problems, that is with
opentidalfarm.problems.sw.SWProblem
.- This solver supports large eddy simulation (LES). The LES model is implemented via the
opentidalfarm.solvers.les.LES
class.
[1] | Goda, Katuhiko. A multistep technique with implicit difference schemes for calculating two-or three-dimensional cavity flows. Journal of Computational Physics 30.1 (1979): 76-95. |
[2] | (1, 2) Simo, J. C., and F. Armero. Unconditional stability and long-term behavior of transient algorithms for the incompressible Navier-Stokes and Euler equations. Computer Methods in Applied Mechanics and Engineering 111.1 (1994): 111-154. |
opentidalfarm.solvers.ipcs_sw_solver.
IPCSSWSolverParameters
[source]¶A set of parameters for a IPCSSWSolver
.
Performance parameters:
Variables: |
|
---|
Large eddy simulation parameters:
Variables: |
|
---|