| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=prec), | public | :: | Rd | = | 287.0_prec | ||
| real(kind=prec), | public | :: | cp | = | 1004.0_prec | ||
| real(kind=prec), | public | :: | cv | = | 717.0_prec | ||
| type(MappedScalar3D), | public | :: | dSdt | ||||
| type(MappedScalar3D), | public | :: | diffDiv | ||||
| type(MappedVector3D), | public | :: | diffFlux | ||||
| real(kind=prec), | public | :: | dt | ||||
| real(kind=prec), | public | :: | entropy | ||||
| real(kind=prec), | public | :: | eta_penalty | = | 4.0_prec | ||
| type(MappedVector3D), | public | :: | flux | ||||
| type(MappedScalar3D), | public | :: | fluxDivergence | ||||
| real(kind=prec), | public | :: | g | = | 9.81_prec | Constant-coefficient Laplacian diffusion. The interface flux is BR1 central + Nitsche-style jump penalty (i.e. SIPG-style): f_R^diff(iVar) = -coeff(iVar) * (avg_grad . n) * nmag + tau(iVar) * (uL - uR) * nmag with tau(iVar) = eta_penalty * coeff(iVar) * (N+1)^2 / length_scale. The penalty is what makes the discrete operator coercive on the checkerboard / odd-even modes that pure BR1 cannot damp. nu : kinematic diffusivity for momentum [m^2/s] kappa : thermal diffusivity for rhotheta [m^2/s] eta_penalty : dimensionless SIPG penalty (default 4.0) length_scale : characteristic element length [m], filled by SetDiffusion from the geometry (mean J^(1/3)2). All default to zero (inviscid). Setting nu or kappa > 0 via SetDiffusion enables the gradient pipeline so that the model can read solutionGradient inside the diffusive flux methods. |
|
| type(SEMHex), | public, | pointer | :: | geometry | |||
| logical, | public | :: | gradient_enabled | = | .false. | ||
| type(BoundaryConditionList), | public | :: | hyperbolicBCs | ||||
| integer, | public | :: | ioIterate | = | 0 | ||
| real(kind=prec), | public | :: | kappa | = | 0.0_prec | ||
| real(kind=prec), | public | :: | length_scale | = | 0.0_prec | Diffusive-flux scratch buffer. Holds the constant-coefficient Laplacian flux F_diff(i,j,k,iel,iVar,d) = -coeff_iVar * d(s_iVar)/dx_d with coeff_iVar = 0 for rho, nu for rhou/rhov/rhow, and kappa for rhotheta. The boundaryNormal slot is filled with the BR1 central flux F_R^diff = -coeff * (avg_grad . n) * nmag (using solutionGradient%avgBoundary, populated by AverageSides). MappedDGDivergence on this buffer gives the parabolic divergence contribution that is then accumulated into fluxDivergence. |
|
| type(Mesh3D), | public, | pointer | :: | mesh | |||
| real(kind=prec), | public | :: | nu | = | 0.0_prec | ||
| integer, | public | :: | nvar | ||||
| real(kind=prec), | public | :: | p0 | = | 100000.0_prec | ||
| type(BoundaryConditionList), | public | :: | parabolicBCs | ||||
| logical, | public | :: | prescribed_bcs_enabled | = | .true. | ||
| type(MappedScalar3D), | public | :: | solution | ||||
| type(MappedVector3D), | public | :: | solutionGradient | ||||
| type(MappedScalar3D), | public | :: | source | ||||
| real(kind=prec), | public | :: | t | ||||
| logical, | public | :: | tecplot_enabled | = | .true. | ||
| procedure(SELF_timeIntegrator), | public, | pointer | :: | timeIntegrator | => | Euler_timeIntegrator | |
| type(MappedTwoPointVector3D), | public | :: | twoPointFlux | ||||
| type(MappedScalar3D), | public | :: | workSol |
Constant-coefficient Laplacian / Bassi-Rebay diffusion hooks
Adds a pressure-balanced warm bubble perturbation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo3D_t), | intent(inout) | :: | this | |||
| real(kind=prec), | intent(in) | :: | dtheta | |||
| real(kind=prec), | intent(in) | :: | r0 | |||
| real(kind=prec), | intent(in) | :: | x0 | |||
| real(kind=prec), | intent(in) | :: | y0 | |||
| real(kind=prec), | intent(in) | :: | z0 |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo3D_t), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo3D), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this | |||
| integer(kind=HID_T), | intent(in) | :: | fileid |
LMARS interface flux on GPU. No hydrostatic pressure split: gravity is handled by the Souza non-conservative source term using the geopotential carried as state variable index 6.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo3D), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel3D_t), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel3D_t), | intent(inout) | :: | this |
GPU-resident tendency for ESAtmo3D. The inviscid pipeline is identical to ECDGModel3D's GPU CalculateTendency; if either nu or kappa is positive, the constant-coefficient Laplacian divergence (BR1 weak-form) is then accumulated into fluxDivergence before forming dSdt.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo3D), | intent(inout) | :: | this |
GPU-resident fill of diffFlux%boundaryNormal with the SIPG-stabilised BR1 diffusive flux: f = -coeff(avg_grad . n)nmag + tau(uL - uR)nmag tau = eta_penaltycoeff(N+1)^2/length_scale, computed on the host.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo3D), | intent(inout) | :: | this |
GPU-resident fill of diffFlux%interior with the constant-coefficient Laplacian flux F_d(iVar) = -coeff(iVar) * d(s_iVar)/dx_d, where coeff is 0 for rho, nu for momentum, kappa for rho*theta.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo3D), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this | |||
| real(kind=prec), | intent(in) | :: | tn |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel3D_t), | intent(inout) | :: | this |
Forward steps the model using the associated tendency procedure and time integrator
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this | |||
| real(kind=prec), | intent(in) | :: | tn | |||
| real(kind=prec), | intent(in) | :: | dt | |||
| real(kind=prec), | intent(in) | :: | ioInterval |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo3D), | intent(inout) | :: | this |
Returns the current simulation time stored in the model % t attribute
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(in) | :: | this | |||
| real(kind=prec), | intent(out) | :: | t |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo3D), | intent(out) | :: | this | |||
| type(Mesh3D), | intent(in), | target | :: | mesh | ||
| type(SEMHex), | intent(in), | target | :: | geometry |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this | |||
| real(kind=prec), | intent(in) | :: | tn |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this | |||
| real(kind=prec), | intent(in) | :: | tn |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this | |||
| real(kind=prec), | intent(in) | :: | tn |
Scan the mesh sideInfo and populate the elements/sides arrays for each registered boundary condition.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel3D_t), | intent(inout) | :: | this |
PreTendency is a template routine that is used to house any additional calculations that you want to execute at the beginning of the tendency calculation routine. This default PreTendency simply returns back to the caller without executing any instructions
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(in) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel3D_t), | intent(inout) | :: | this | |||
| character, | intent(in) | :: | fileName |
Base method for reporting the entropy of a model to stdout. Only override this procedure if additional reporting is needed. Alternatively, if you think additional reporting would be valuable for all models, open a pull request with modifications to this base method.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(in) | :: | this |
Base method for reporting the entropy of a model to stdout. Only override this procedure if additional reporting is needed. Alternatively, if you think additional reporting would be valuable for all models, open a pull request with modifications to this base method.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel3D_t), | intent(inout) | :: | this |
Method that can be overridden by users to report their own custom metrics after file io
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this |
Apply registered boundary conditions for the solution.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel3D_t), | intent(inout) | :: | this |
Set the constant-coefficient Laplacian diffusion coefficients (kinematic momentum diffusivity and thermal diffusivity, both in m^2/s) and the dimensionless SIPG jump penalty. Setting nu or kappa > 0 enables the gradient pipeline so that the diffusive flux methods receive solutionGradient.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo3D_t), | intent(inout) | :: | this | |||
| real(kind=prec), | intent(in) | :: | nu | |||
| real(kind=prec), | intent(in) | :: | kappa | |||
| real(kind=prec), | intent(in), | optional | :: | eta_penalty |
Apply registered boundary conditions for the solution gradient.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel3D_t), | intent(inout) | :: | this |
Initialise a hydrostatically balanced atmosphere with uniform potential temperature theta0, zero velocity, and the geopotential Phi = g*z carried as state variable index 6.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo3D_t), | intent(inout) | :: | this | |||
| real(kind=prec), | intent(in) | :: | theta0 |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo3D_t), | intent(inout) | :: | this |
Six conserved variables: (rho, rhou, rhov, rhow, rhotheta, Phi), where Phi = g*z is the geopotential. Phi has zero flux (volume and surface) so its tendency is identically zero; it is carried in the state vector solely so that the Souza et al. (2023) non-conservative gravity flux differencing in SourceMethod can read it node-locally.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo3D_t), | intent(inout) | :: | this |
Sets the model % t attribute with the provided simulation time
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this | |||
| real(kind=prec), | intent(in) | :: | t |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel3D_t), | intent(inout) | :: | this | |||
| character, | intent(in) | :: | eqnChar(1:this%solution%nVar) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel3D_t), | intent(inout) | :: | this | |||
| type(EquationParser), | intent(in) | :: | eqn(1:this%solution%nVar) |
Sets the time integrator method, using a character input
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this | |||
| character, | intent(in) | :: | integrator |
Souza et al. (2023) non-conservative gravity flux differencing on GPU. The geopotential lives at solution(:,:,:,:,6); the source for rho*w is computed via the SBP-EC two-point form using log-mean density and the contravariant metric. Fully device-resident.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo3D), | intent(inout) | :: | this |
Souza et al. (2023) entropy-conservative two-point flux on GPU. Fully device-resident.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo3D), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel3D_t), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | m |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel3D_t), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | m |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel3D_t), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | m |
Computes a solution update as , where dt is either provided through the interface or taken as the Model's stored time step size (model % dt)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel3D_t), | intent(inout) | :: | this | |||
| real(kind=prec), | intent(in), | optional | :: | dt |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel3D_t), | intent(inout) | :: | this | |||
| character, | intent(in), | optional | :: | fileName |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel3D_t), | intent(inout) | :: | this | |||
| character, | intent(in), | optional | :: | filename |
Mathematical entropy: total energy density (kinetic + internal).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo3D_t), | intent(in) | :: | this | |||
| real(kind=prec), | intent(in) | :: | s(1:this%nvar) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(in) | :: | this | |||
| real(kind=prec), | intent(in) | :: | s(1:this%nvar) | |||
| real(kind=prec), | intent(in) | :: | dsdx(1:this%nvar) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(in) | :: | this | |||
| real(kind=prec), | intent(in) | :: | s(1:this%nvar) | |||
| real(kind=prec), | intent(in) | :: | dsdx(1:this%nvar,1:2) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(in) | :: | this | |||
| real(kind=prec), | intent(in) | :: | s(1:this%nvar) | |||
| real(kind=prec), | intent(in) | :: | dsdx(1:this%nvar,1:3) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(in) | :: | this | |||
| real(kind=prec), | intent(in) | :: | sL(1:this%nvar) | |||
| real(kind=prec), | intent(in) | :: | sR(1:this%nvar) | |||
| real(kind=prec), | intent(in) | :: | dsdx(1:this%nvar) | |||
| real(kind=prec), | intent(in) | :: | nhat |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(in) | :: | this | |||
| real(kind=prec), | intent(in) | :: | sL(1:this%nvar) | |||
| real(kind=prec), | intent(in) | :: | sR(1:this%nvar) | |||
| real(kind=prec), | intent(in) | :: | dsdx(1:this%nvar,1:2) | |||
| real(kind=prec), | intent(in) | :: | nhat(1:2) |
Local Lax-Friedrichs (Rusanov) Riemann flux.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo3D_t), | intent(in) | :: | this | |||
| real(kind=prec), | intent(in) | :: | sL(1:this%nvar) | |||
| real(kind=prec), | intent(in) | :: | sR(1:this%nvar) | |||
| real(kind=prec), | intent(in) | :: | dsdx(1:this%nvar,1:3) | |||
| real(kind=prec), | intent(in) | :: | nhat(1:3) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(in) | :: | this | |||
| real(kind=prec), | intent(in) | :: | s(1:this%nvar) | |||
| real(kind=prec), | intent(in) | :: | dsdx(1:this%nvar) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(in) | :: | this | |||
| real(kind=prec), | intent(in) | :: | s(1:this%nvar) | |||
| real(kind=prec), | intent(in) | :: | dsdx(1:this%nvar,1:2) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(in) | :: | this | |||
| real(kind=prec), | intent(in) | :: | s(1:this%nvar) | |||
| real(kind=prec), | intent(in) | :: | dsdx(1:this%nvar,1:3) |
Souza et al. (2023, JAMES) entropy-conservative two-point flux for compressible Euler in (rho, rhov, rhotheta) variables with p = p0(rhoRd*theta/p0)^gamma.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo3D_t), | intent(in) | :: | this | |||
| real(kind=prec), | intent(in) | :: | sL(1:this%nvar) | |||
| real(kind=prec), | intent(in) | :: | sR(1:this%nvar) |
type,extends(ESAtmo3D_t),public :: ESAtmo3D
contains
procedure :: Init => Init_ESAtmo3D
procedure :: Free => Free_ESAtmo3D
procedure :: AdditionalInit => AdditionalInit_ESAtmo3D
procedure :: BoundaryFlux => BoundaryFlux_ESAtmo3D
procedure :: TwoPointFluxMethod => TwoPointFluxMethod_ESAtmo3D
procedure :: SourceMethod => SourceMethod_ESAtmo3D
procedure :: DiffusiveFluxMethod => DiffusiveFluxMethod_ESAtmo3D
procedure :: DiffusiveBoundaryFlux => DiffusiveBoundaryFlux_ESAtmo3D
procedure :: CalculateTendency => CalculateTendency_ESAtmo3D
endtype ESAtmo3D