Energy PKs#
Energy PKs describe the conservation of energy as it is advected and diffuses both above and below-ground. Both surface and subsurface energy equations are based on a simple advection-diffusion equation, and include variants with and without freeze-thaw processes.
Energy Base PK#
An advection-diffusion equation for energy.
Solves an advection-diffusion equation for energy:
energy-pk-spec
“domain”
[string]
“domain” Defaults to the subsurface mesh.“primary variable”
[string]
The primary variable associated with this PK, typically “DOMAIN-temperature” Note there is no default – this must be provided by the user.“boundary conditions”
[list]
Defaults to 0 diffusive flux boundary condition. See `Energy-specific Boundary Conditions`_“thermal conductivity evaluator”
[list]
The thermal conductivity. This needs to go away, and should get moved to State.“absolute error tolerance”
[double]
76.e-6 A small amount of energy, see error norm. [MJ]“upwind conductivity method”
[string]
arithmetic mean Method of moving cell-based thermal conductivities onto faces. One of:“arithmetic mean” the default, average of neighboring cells
“cell centered” harmonic mean
IF
“explicit advection”
[bool]
false Treat the advection term implicitly.
ELSE
“supress advective terms in preconditioner”
[bool]
false Typically subsurface energy equations are strongly diffusion dominated, and the advective terms may add little. With this flag on, we ignore theem in the preconditioner, making an easier linear solve and often not negatively impacting the nonlinear solve.“advection preconditioner”
[list]
optional Typically defaults are correct.
END
“diffusion”
[pde-diffusion-spec]
See PDE_Diffusion_, the diffusion operator.“diffusion preconditioner”
[pde-diffusion-spec]
See PDE_Diffusion_, the inverse operator. Typically only adds Jacobian terms, as all the rest default to those values from “diffusion”.
IF
“source term”
[bool]
false Is there a source term?
THEN
“source key”
[string]
DOMAIN-total_energy_source Typically not set, as the default is good.[MJ s^-1]
“source term is differentiable”
[bool]
true Can the source term be differentiated with respect to the primary variable?“source term finite difference”
[bool]
false If the source term is not diffferentiable, we can do a finite difference approximation of this derivative anyway. This is useful for difficult-to-differentiate terms like a surface energy balance, which includes many terms.
END
Globalization:
“modify predictor with consistent faces”
[bool]
false In a face+cell diffusion discretization, this modifies the predictor to make sure that faces, which are a DAE, are consistent with the predicted cells (i.e. face fluxes from each sides match).“modify predictor for freezing”
[bool]
false A simple limiter that keeps temperature corrections from jumping over the phase change.“limit correction to temperature change [K]”
[double]
-1.0 If > 0, stops nonlinear updates from being too big through clipping.
The following are rarely set by the user, as the defaults are typically right.
“advection”
[list]
optional The PDE_Advection_ spec. Only one current implementation, so defaults are typically fine.“accumulation preconditioner”
[pde-accumulation-spec]
optional The inverse of the accumulation operator. See PDE_Accumulation_. Typically not provided by users, as defaults are correct.
IF
“coupled to surface via flux”
[bool]
false If true, apply surface boundary conditions from an exchange flux. Note, if this is a coupled problem, it is probably set by the MPC. No need for a user to set it.
THEN
“surface-subsurface energy flux key”
[string]
DOMAIN-surface_subsurface_energy_flux
END
“coupled to surface via temperature”
[bool]
false If true, apply surface boundary conditions from the surface temperature (Dirichlet).
KEYS:
“conserved quantity” DOMAIN-energy The total energy \(E\) [MJ]
“energy” DOMAIN-energy The total energy \(E\), also the conserved quantity. [MJ]
“water content” DOMAIN-water_content The total mass \(\Theta\), used in error norm [mol]
“enthalpy” DOMAIN-enthalpy The specific enthalpy :math`e` [MJ mol^-1]
“flux” DOMAIN-water_flux The water flux \(\mathbf{q}\) used in advection. [mol s^-1]
“diffusive energy” DOMAIN-diffusive_energy_flux \(\mathbf{q_e}\) [MJ s^-1]
“advected energy” DOMAIN-advected_energy_flux \(\mathbf{q_e^{adv}} = q e\) [MJ s^-1]
“thermal conductivity” DOMAIN-thermal_conductivity Thermal conductivity on cells [W m^-1 K^-1]
“upwinded thermal conductivity” DOMAIN-upwinded_thermal_conductivity Thermal conductivity on faces [W m^-1 K^-1]
EVALUATORS:
“source term” optional If source key is provided.
“enthalpy”
“cell volume”
“thermal conductivity”
“conserved quantity”
“energy”
Two-Phase subsurface Energy PK#
An advection-diffusion equation for energy in two phases.
This is simply a subsurface energy equation that places a few more requirements on the base class. It could probably go away if we refactor to remove hard-coded evaluators.
Three-Phase subsurface Energy PK#
An advection-diffusion equation for energy in three phases.
This is simply a subsurface energy equation that places a few more requirements on the base class. It could probably go away if we refactor to remove hard-coded evaluators.
Overland energy with Ice#
An advection-diffusion equation for surface energy in two phases.
This is simply a surface energy equation that places a few more requirements on the base class. It could probably go away if we refactor to remove hard-coded evaluators.
energy-surface-ice-pk-spec
These are typically not set by the user:
“coupled to subsurface via temperature”
[bool]
false A coupling scheme, provided by MPC.“coupled to subsurface via flux”
[bool]
false A coupling scheme, provided by MPC.“subsurface domain name”
[string]
optional If one of the above coupling schemes is turned on, we need to know the subsurface mesh. Provided by MPC.
INCLUDES:
[energy-pk-spec]
See Energy Base PK