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#
src/physics/ats/src/pks/energy/energy_base.hh
Solves an advection-diffusion equation for transport of energy:
Note that this is implemented rather differently than chemical transport, likely for unclear (historical) reasons. At some point energy and chemical transport should probably be merged into a shared PK which supports both sequential and globally implicit coupling of flow and transport.
Note that this is a base class and cannot be directly created. Instead, use two-phase or three-phase energy PKs.
pk-energy-base-spec
“domain”
[string]
“domain” Defaults to the subsurface mesh.“primary variable”
[string]
DOMAIN-temperature The primary variable associated with this PK.“boundary conditions”
[list]
Defaults to 0 diffusive flux boundary condition. See Energy-specific Boundary Conditions“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
Math and solver algorithm options:
“inverse”
[inverse-spec]
optional The inverse used for preconditioning in a non-globally coupled problem. See Inverse.“advection”
[advection-upwind-op-spec]
See Advection. Only one current implementation, so defaults are typically fine.
IF
“explicit advection”
[bool]
false Treat the advection term explicitly.
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 them in the preconditioner, making an easier linear solve and often not negatively impacting the nonlinear solve. Note that this does NOT change the answer, just the performance.“advection preconditioner”
[advection-upwind-op-spec
optional Typically defaults are correct. See Advection.
END
“diffusion”
[pde-diffusion-typedinline-spec]
See Diffusion, the diffusion operator.“diffusion preconditioner”
[pde-diffusion-typedinline-spec]
See 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 finite difference”
[bool]
false Option to do a finite difference approximation of the source term’s derivative with respect to the primary variable. 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 algebraic relative to cells, are consistent with the predicted cells values (i.e. face fluxes from each side 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.
“accumulation preconditioner”
[pde-accumulation-spec]
optional The inverse of the accumulation operator. See Accumulation. Typically not provided by users, as defaults are correct.
Algorithmic physics control:
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 Energy PK#
src/physics/ats/src/pks/energy/energy_two_phase.hh
Modifies the energy equation to provide two-phase energy (water + vapor/air).
“PK type” = “two-phase energy”
Three-Phase Energy PK#
src/physics/ats/src/pks/energy/energy_three_phase.hh
Modifies the energy equation to provide three-phase energy (water + ice + vapor/air).
“PK type” = “three-phase energy”
Overland Energy with Ice#
src/physics/ats/src/pks/energy/energy_surface_ice.hh
Modifies the energy equation to implement overland energy transport, particularly dealing with coupling terms to the subsurface energy equation.
Note that this does not, but default, include all terms for a surface energy balance. Those would typically be included on a snow surface energy balance PK, which would also compute a skin energy flux that would become a source term for this PK.
“PK type” = “suface energy”
pk-surface-energy-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:
[pk-energy-base-spec]
See Energy Base PK