| 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(MappedScalar2D), | public | :: | dSdt | ||||
| type(MappedScalar2D), | public | :: | diffDiv | ||||
| type(MappedVector2D), | public | :: | diffFlux | ||||
| real(kind=prec), | public | :: | dt | ||||
| real(kind=prec), | public | :: | entropy | ||||
| real(kind=prec), | public | :: | eta_penalty | = | 4.0_prec | ||
| type(MappedVector2D), | public | :: | flux | ||||
| type(MappedScalar2D), | 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. 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/2)2). |
|
| type(SEMQuad), | public, | pointer | :: | geometry | => | null() | |
| 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,iel,iVar,d) = -coeff_iVar * d(s_iVar)/dx_d. |
|
| type(Mesh2D), | public, | pointer | :: | mesh | => | null() | |
| integer, | public | :: | nUnmappedBoundaries | = | 0 | The first unregistered bcid found, and meaningful only when nUnmappedBoundaries > 0: -1 is itself a legal bcid, so it cannot double as an "absent" marker. |
|
| integer, | public | :: | nstepped | = | 0 | ||
| real(kind=prec), | public | :: | nu | = | 0.0_prec | ||
| integer, | public | :: | nvar | ||||
| real(kind=prec), | public | :: | p0 | = | 100000.0_prec | ||
| type(BoundaryConditionList), | public | :: | parabolicBCs | Mesh boundary edges whose sideInfo(5) boundary condition id matches no registered boundary condition, counted over the whole domain by MapBoundaryConditions and summed across ranks. Nothing writes solution%extBoundary on such an edge, so the Riemann solver reads zeros at t = 0 and stale values afterwards. ReportUnmappedBoundaries warns about them once, from the top of ForwardStep. |
|||
| logical, | public | :: | prescribed_bcs_enabled | = | .true. | ||
| type(MappedScalar2D), | public | :: | solution | ||||
| type(MappedVector2D), | public | :: | solutionGradient | ||||
| type(MappedScalar2D), | public | :: | source | ||||
| real(kind=prec), | public | :: | t | ||||
| logical, | public | :: | tecplot_enabled | = | .true. | ||
| procedure(SELF_timeIntegrator), | public, | pointer | :: | timeIntegrator | => | Euler_timeIntegrator | |
| real(kind=prec), | public, | allocatable | :: | transferStage(:,:,:,:) | Migrated old-element window, held between MigrateOldWindow and ApplyTransferPlan on the multi-rank path: the contiguous run of OLD elements this rank's new element range references. Flat, because it is viewed through a rank-remapped pointer whose element lower bound is the window's first GLOBAL old element index - the numbering the transfer plan uses. Persistent and grow-only, so a settled adapting run allocates nothing here. The GPU backend overrides the migration and keeps the window in device memory instead, leaving this unallocated. |
||
| type(MappedTwoPointVector2D), | public | :: | twoPointFlux | ||||
| logical, | public | :: | unmappedBoundariesReported | = | .false. | Pre-regrid copy of the solution, held between StageSolutionForTransfer and ApplyTransferPlan so that Regrid is free to release the storage it was read from. The base implementation stages on the host; the GPU backend overrides both procedures and stages device-side instead, leaving this unallocated. |
|
| integer, | public | :: | unmappedBoundaryID | = | -1 | ||
| real(kind=prec), | public, | allocatable | :: | winStage(:) | |||
| integer, | public | :: | winStageFirst | = | 0 | global old index of winStage's first element |
|
| integer, | public | :: | winStageN | = | 0 | window element count; 0 means no window is migrated |
|
| type(MappedScalar2D), | public | :: | workSol |
Constant-coefficient Laplacian / Bassi-Rebay diffusion hooks
Adds a pressure-balanced warm bubble perturbation.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo2D_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 |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo2D_t), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo2D_t), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this | |||
| integer(kind=HID_T), | intent(in) | :: | fileid |
Transfer the staged pre-regrid solution onto the regridded mesh through plan, filling the rank-local element range [eFirst,eLast] of the new solution.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_t), | intent(inout), | target | :: | this | ||
| type(TransferPlan2D), | intent(in), | target | :: | plan | ||
| type(Lagrange), | intent(in) | :: | interp | |||
| integer, | intent(in) | :: | eFirst | |||
| integer, | intent(in) | :: | eLast | |||
| real(kind=prec), | intent(in), | optional | contiguous | :: | uGlobal(:,:,:,:) | |
| integer, | intent(in), | optional | :: | oldFirst |
LMARS (Low-Mach Approximate Riemann Solver, Chen et al. 2013) interface flux. No hydrostatic pressure split: gravity is folded into SourceMethod via the Souza non-conservative form using the geopotential carried in the state vector (variable index 5).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo2D_t), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_t), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_t), | intent(inout) | :: | this |
ESAtmo2D tendency = EC inviscid pipeline (parent) + optional constant-coefficient Laplacian diffusion (BR1 weak-form DG).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo2D_t), | intent(inout) | :: | this |
Fill diffFlux%boundaryNormal with the SIPG-stabilised BR1 flux:
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo2D_t), | intent(inout) | :: | this |
Fill diffFlux%interior with the constant-coefficient Laplacian flux at every interior node:
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo2D_t), | intent(inout) | :: | this |
Copy the migrated window into a host array, for the SELF_AMR_MIGRATE_VERIFY diagnostic. Diagnostic-only and off the default path: on a GPU build the override is a device-to-host transfer of the whole window, which is exactly the traffic the device path exists to avoid.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_t), | intent(in) | :: | this | |||
| integer, | intent(in) | :: | wFirst | |||
| integer, | intent(in) | :: | wLast | |||
| real(kind=prec), | intent(out), | target, contiguous | :: | uWin(:,:,:,:) | (Np,Np,nWinElem,nvar) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this | |||
| real(kind=prec), | intent(in) | :: | tn |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_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(ECDGModel2D_t), | 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(ECDGModel2D_t), | intent(out) | :: | this | |||
| type(Mesh2D), | intent(in), | target | :: | mesh | ||
| type(SEMQuad), | 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(DGModel2D_t), | intent(inout) | :: | this |
Migrate the pre-regrid solution into this rank's old-element window, ready for a windowed ApplyTransferPlan. Call it BEFORE Regrid, which releases the storage the sends read:
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_t), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | winFirst(:) | (1:nRanks) window lower bounds, from PlanWindows |
||
| integer, | intent(in) | :: | winLast(:) | (1:nRanks) window upper bounds |
||
| integer, | intent(in) | :: | wFirst | this rank's window (wFirst > wLast if empty) |
||
| integer, | intent(in) | :: | wLast | |||
| integer(kind=int64), | intent(inout) | :: | nBytesRecv | |||
| integer(kind=int64), | intent(inout) | :: | nBytesSent | |||
| integer(kind=int64), | intent(inout) | :: | nElemRemote |
PostStepHook is a template routine invoked by the time integrators once immediately after each completed time step (after this%t has advanced by this%dt). The default implementation is a no-op.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this |
PreStepHook is a template routine invoked by the time integrators once immediately before each time step is taken (before any Runge-Kutta stages of that step). The default implementation is a no-op.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(inout) | :: | this |
PreTendencyHook 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 PreTendencyHook 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(DGModel2D_t), | intent(inout) | :: | this | |||
| character, | intent(in) | :: | fileName |
Rebind a live model to a new mesh/geometry pair (AMR regrid). The mesh-sized solution storage is reallocated and the boundary-condition registrations and maps are rebuilt for the new mesh, while everything that is not mesh-sized is preserved: the time state (t, dt, entropy, IO counter), the time-integrator selection, configuration flags, and any model-specific parameters (Init is intent(out) and would reset all of these). nvar/nstepped are unchanged - the model solves the same equations on a new mesh.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_t), | intent(inout) | :: | this | |||
| type(Mesh2D), | intent(in), | target | :: | mesh | ||
| type(SEMQuad), | intent(in), | target | :: | geometry |
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(DGModel2D_t), | intent(inout) | :: | this |
Warn, once, about mesh boundary edges whose bcid has no registered boundary condition. MapBoundaryConditions establishes the count; ForwardStep calls this.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_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. Each boundary condition method loops over its own boundary faces.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_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(ESAtmo2D_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. Each boundary condition method loops over its own boundary faces.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_t), | intent(inout) | :: | this |
Initialise a hydrostatically balanced atmosphere with uniform potential temperature theta0, zero velocity, and the geopotential Phi = g*y carried as state variable index 5.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo2D_t), | intent(inout) | :: | this | |||
| real(kind=prec), | intent(in) | :: | theta0 |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo2D_t), | intent(inout) | :: | this |
Five conserved variables: (rho, rhou, rhov, rhotheta, Phi), where Phi = gy 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(ESAtmo2D_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(DGModel2D_t), | intent(inout) | :: | this | |||
| character, | intent(in) | :: | eqnChar(1:this%solution%nVar) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_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.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo2D_t), | intent(inout) | :: | this |
Preserve the current solution ahead of a regrid, so that Regrid may release the storage it lives in. Pair with ApplyTransferPlan, which consumes the staged copy:
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_t), | intent(inout) | :: | this |
Pre-projected scalar contravariant two-point Souza et al. (2023) EC flux. For each node pair (a, b) along reference direction r:
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo2D_t), | intent(inout) | :: | this |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_t), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | m |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_t), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | m |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_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(DGModel2D_t), | intent(inout) | :: | this | |||
| real(kind=prec), | intent(in), | optional | :: | dt |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_t), | intent(inout) | :: | this | |||
| character, | intent(in), | optional | :: | fileName |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel2D_t), | intent(inout) | :: | this | |||
| character, | intent(in), | optional | :: | filename |
Mathematical entropy: total energy density (kinetic + internal).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo2D_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 |
Local Lax-Friedrichs (Rusanov) Riemann flux. Provided as a fallback; the model overrides BoundaryFlux directly with the LMARS solver.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo2D_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:2) | |||
| real(kind=prec), | intent(in) | :: | nhat(1:2) |
| 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: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 2-D compressible Euler in (rho, rhov, rhotheta) variables with p = p0(rhoRd*theta/p0)^gamma.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ESAtmo2D_t), | intent(in) | :: | this | |||
| real(kind=prec), | intent(in) | :: | sL(1:this%nvar) | |||
| real(kind=prec), | intent(in) | :: | sR(1:this%nvar) |
type,extends(ECDGModel2D) :: ESAtmo2D_t
real(prec) :: p0 = 100000.0_prec ! Reference pressure [Pa]
real(prec) :: Rd = 287.0_prec ! Gas constant for dry air [J/(kg*K)]
real(prec) :: cp = 1004.0_prec ! Specific heat at constant pressure [J/(kg*K)]
real(prec) :: cv = 717.0_prec ! Specific heat at constant volume [J/(kg*K)]
real(prec) :: g = 9.81_prec ! Gravitational acceleration [m/s^2]
!! 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.
!!
!! nu : kinematic diffusivity for momentum [m^2/s]
!! kappa : thermal diffusivity for rho*theta [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/2)*2).
real(prec) :: nu = 0.0_prec
real(prec) :: kappa = 0.0_prec
real(prec) :: eta_penalty = 4.0_prec
real(prec) :: length_scale = 0.0_prec
!! Diffusive-flux scratch buffer. Holds the constant-coefficient
!! Laplacian flux F_diff(i,j,iel,iVar,d) = -coeff_iVar * d(s_iVar)/dx_d.
type(MappedVector2D) :: diffFlux
type(MappedScalar2D) :: diffDiv
contains
procedure :: SetNumberOfVariables => SetNumberOfVariables_ESAtmo2D_t
procedure :: SetMetadata => SetMetadata_ESAtmo2D_t
procedure :: entropy_func => entropy_func_ESAtmo2D_t
procedure :: twopointflux2d => twopointflux2d_ESAtmo2D_t
procedure :: TwoPointFluxMethod => TwoPointFluxMethod_ESAtmo2D_t
procedure :: riemannflux2d => riemannflux2d_ESAtmo2D_t
procedure :: BoundaryFlux => BoundaryFlux_ESAtmo2D_t
procedure :: SourceMethod => SourceMethod_ESAtmo2D_t
procedure :: AdditionalInit => AdditionalInit_ESAtmo2D_t
procedure :: AdditionalFree => AdditionalFree_ESAtmo2D_t
procedure :: SetHydrostaticBalance => SetHydrostaticBalance_ESAtmo2D_t
procedure :: AddThermalBubble => AddThermalBubble_ESAtmo2D_t
!! Constant-coefficient Laplacian / Bassi-Rebay diffusion hooks
procedure :: SetDiffusion => SetDiffusion_ESAtmo2D_t
procedure :: DiffusiveFluxMethod => DiffusiveFluxMethod_ESAtmo2D_t
procedure :: DiffusiveBoundaryFlux => DiffusiveBoundaryFlux_ESAtmo2D_t
procedure :: CalculateTendency => CalculateTendency_ESAtmo2D_t
endtype ESAtmo2D_t