Scalar equation
scalar_equation
Scalar terms (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
.
advection_term(eq, trial)
Scalar advection term (non-conservative): u \dot \div(q).
Source code in g-adopt/gadopt/scalar_equation.py
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 |
|
diffusion_term(eq, trial)
Scalar diffusion term \(-nabla * (kappa grad q)\).
Using the symmetric interior penalty method, the weak form becomes
where σ is a penalty parameter.
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/scalar_equation.py
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
|
source_term(eq, trial)
Scalar source term s_T
.
Source code in g-adopt/gadopt/scalar_equation.py
127 128 129 130 131 |
|
sink_term(eq, trial)
Scalar sink term \alpha_T T
.
Source code in g-adopt/gadopt/scalar_equation.py
134 135 136 137 138 139 |
|
mass_term(eq, trial)
UFL form for the mass term used in the time discretisation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
eq |
Equation
|
G-ADOPT Equation. |
required |
trial |
Argument | Indexed | Function
|
Firedrake trial function. |
required |
Returns:
Type | Description |
---|---|
Form
|
The UFL form associated with the mass term of the equation. |
Source code in g-adopt/gadopt/scalar_equation.py
142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
|