Scalar equation
scalar_equation
Scalar terms and equations (e.g. for temperature and salinity transport).
All terms are considered as if they were on the right-hand side of the equation, leading
to the following UFL expression returned by the residual
method:
This sign convention ensures compatibility with Thetis's time integrators. In general,
however, we like to think about the terms as they are on the left-hand side. Therefore,
in the residual methods below, we first sum the terms in the variable F
as if they
were on the left-hand side, i.e.
and then return -F
.
Users should not interact with these classes; instead, please use the solver provided in the stokes_integrators module.
ScalarAdvectionTerm(test_space, trial_space, dx, ds, dS, **kwargs)
Bases: BaseTerm
Scalar advection term (non-conservative): u \dot \div(q).
Source code in g-adopt/gadopt/equations.py
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
|
ScalarDiffusionTerm(test_space, trial_space, dx, ds, dS, **kwargs)
Bases: BaseTerm
Scalar diffusion term \(-nabla * (kappa grad q)\).
Using the symmetric interior penalty method, the weak form becomes
where σ is a penalty parameter (see Epshteyn and Riviere, 2007).
Epshteyn, Y., & Rivière, B. (2007). Estimation of penalty parameters for symmetric interior penalty Galerkin methods. Journal of Computational and Applied Mathematics, 206(2), 843-872.
Source code in g-adopt/gadopt/equations.py
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
|
ScalarSourceTerm(test_space, trial_space, dx, ds, dS, **kwargs)
Bases: BaseTerm
Scalar source term s_T
.
Source code in g-adopt/gadopt/equations.py
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
|
ScalarAbsorptionTerm(test_space, trial_space, dx, ds, dS, **kwargs)
Bases: BaseTerm
Scalar absorption term \alpha_T T
.
Source code in g-adopt/gadopt/equations.py
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
|
ScalarAdvectionEquation(test_space, trial_space, quad_degree=None, **kwargs)
Bases: BaseEquation
Scalar advection equation with source and absorption terms.
Source code in g-adopt/gadopt/equations.py
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 78 |
|
ScalarAdvectionDiffusionEquation(test_space, trial_space, quad_degree=None, **kwargs)
Bases: BaseEquation
Scalar advection-diffusion equation with source and absorption terms.
Source code in g-adopt/gadopt/equations.py
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 78 |
|
EnergyEquation(test_space, trial_space, rhocp=None, quad_degree=None)
Bases: ScalarAdvectionDiffusionEquation
Energy equation defined as an advection-diffusion equation.
Source code in g-adopt/gadopt/scalar_equation.py
232 233 234 235 236 237 238 239 240 |
|
mass_term(test, trial)
UFL expression for the mass term used in the time discretisation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
test |
Argument
|
Firedrake test function |
required |
trial |
Argument | Function
|
Firedrake trial function |
required |
Returns:
Type | Description |
---|---|
Expr
|
The UFL expression associated with the mass term of the equation. |
Source code in g-adopt/gadopt/scalar_equation.py
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 |
|