Scalar equation
scalar_equation
Scalar terms (e.g. for temperature and salinity transport).
All terms are considered as if they were on the left-hand side of the equation, leading
to the following UFL expression returned by the Equation's residual method:
advection_term(eq, trial)
Scalar advection term (non-conservative): u \dot \div(q).
Source code in g-adopt/gadopt/scalar_equation.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | |
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
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 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 | |
source_term(eq, trial)
Scalar source term s_T.
Source code in g-adopt/gadopt/scalar_equation.py
114 115 116 | |
sink_term(eq, trial)
Scalar sink term \alpha_T T.
Source code in g-adopt/gadopt/scalar_equation.py
119 120 121 122 | |
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
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | |