proteus.mprans.GN_SW2DCV module

class proteus.mprans.GN_SW2DCV.NumericalFlux(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions=None, h_eps=1e-08, tol_u=1e-08)[source]

Bases: proteus.NumericalFlux.ShallowWater_2D

hasInterior = False[source]
class proteus.mprans.GN_SW2DCV.RKEV(transport, timeOrder=1, runCFL=0.1, integrateInterpolationPoints=False)[source]

Bases: proteus.TimeIntegration.SSP

Set flags that indicate that all terms are implicit.

TimeIntegration = <module 'proteus.TimeIntegration' from '/home/cekees/proteus/linux/lib/python3.7/site-packages/proteus/TimeIntegration.py'>[source]
choose_dt()[source]

Modify self.dt

initialize_dt(t0, tOut, q)[source]

Modify self.dt

setCoefficients()[source]

beta are all 1’s here mwf not used right now

updateStage()[source]

Need to switch to use coefficients

initializeTimeHistory(resetFromDOF=True)[source]

Push necessary information into time history arrays

updateTimeHistory(resetFromDOF=False)[source]

assumes successful step has been taken

generateSubsteps(tList)[source]

create list of substeps over time values given in tList. These correspond to stages

resetOrder(order)[source]

initialize data structures for stage updges

setFromOptions(nOptions)[source]

allow classes to set various numerical parameters

class proteus.mprans.GN_SW2DCV.Coefficients(bathymetry, nu=1.004e-06, g=9.8, nd=2, sd=True, movingDomain=False, useRBLES=0.0, useMetrics=0.0, modelIndex=0, cE=1.0, LUMPED_MASS_MATRIX=1, LINEAR_FRICTION=0, mannings=0.0, forceStrongConditions=True, constrainedDOFs=None)[source]

Bases: proteus.TransportCoefficients.TC_base

The coefficients for the shallow water, modified Green-Naghdi equations

Set the number of components (equations) of the PDE and initialize the dicitionaries describing the form of the coefficients. Strings naming each component (used for viewing and archiving) and a structure defining the sparsity pattern of diffusion tensors may also be provided.

attachModels(modelList)[source]

Give the TC object access to other models in a loosely coupled split operator formulation (e.g. a transport equation for concentration might get velocity from a flow equation)

initializeMesh(mesh)[source]

Give the TC object access to the mesh for any mesh-dependent information.

initializeElementQuadrature(t, cq)[source]

Give the TC object access to the element quadrature storage

initializeElementBoundaryQuadrature(t, cebq, cebq_global)[source]

Give the TC object access to the element boundary quadrature storage

initializeGlobalExteriorElementBoundaryQuadrature(t, cebqe)[source]

Give the TC object access to the exterior element boundary quadrature storage

updateToMovingDomain(t, c)[source]
evaluate(t, c)[source]

Evaluate the coefficients at a given time, t, using the coefficient storage passed in as the dictionary c.

preStep(t, firstStep=False)[source]

Give the TC object an opportunity to modify itself before the time step.

postStep(t, firstStep=False)[source]

Give the TC object an opportunity to modify itself after the time step.

class proteus.mprans.GN_SW2DCV.LevelModel(uDict, phiDict, testSpaceDict, matType, dofBoundaryConditionsDict, dofBoundaryConditionsSetterDict, coefficients, elementQuadrature, elementBoundaryQuadrature, fluxBoundaryConditionsDict=None, advectiveFluxBoundaryConditionsSetterDict=None, diffusiveFluxBoundaryConditionsSetterDictDict=None, stressTraceBoundaryConditionsSetterDictDict=None, stabilization=None, shockCapturing=None, conservativeFluxDict=None, numericalFluxType=None, TimeIntegrationClass=None, massLumping=False, reactionLumping=False, options=None, name='GN_SW2DCV', reuse_trial_and_test_quadrature=True, sd=True, movingDomain=False, bdyNullSpace=False)[source]

Bases: proteus.Transport.OneLevelTransport

Allocate storage and initialize some variables.

Parameters
  • uDict (dict) – Dictionary of proteus.FemTools.FiniteElementFunction objects.

  • phiDict (dict) – Dictionary of proteus.FemTools.FiniteElementFunction objects.

  • testSpaceDict (dict) – Dictionary of FiniteElementSpace objects

  • dofBoundaryConditionsDict (dict) – Dictionary of DOFBoundaryConditions objects for the Dirichlet conditions.

  • coefficients (proteus.TransportCoefficients.TC_base) – Problem’s Transport Coefficients class.

  • elementQuadratureDict (dict) – Dictionary of dictionaries of quadrature rules for each element integral in each component equation.

  • elementBoundaryQuadratureDict (dict) – Dictionary of dictionaries of quadrature rules for each element boundary integral in each component equation

  • stabilization (bool) –

  • shockCapturing (bool) –

  • numericalFlux (bool) –

  • bdyNullSpace (bool) – Indicates whether the boundary conditions create a global null space.

Notes

The constructor sets the input arguments, calculates dimensions, and allocates storage. The meanings of variable suffixes are

  • global – per physical domain

  • element – per element

  • elementBoundary – per element boundary

The prefix n means ‘number of’.

Storage is divided into quantities required at different sets of points or geometric entities. Each type of storage has a dictionary for all the quantities of that type. The names and dimensions of the storage dictionaries are

  • e – at element

  • q – at element quadrature, unique to elements

  • ebq – at element boundary quadrature, unique to elements

  • ebq_global – at element boundary quadrature, unique to element boundary

  • ebqe – at element boundary quadrature, unique to global, exterior element boundary

  • phi_ip – at the generalized interpolation points required to build a nonlinear phi

nCalls = 0[source]
FCTStep()[source]
getDOFsCoord()[source]
getCMatrices()[source]
updateConstrainedDOFs()[source]
updateReflectingBoundaryConditions()[source]
initDataStructures()[source]
getResidual(u, r)[source]

Calculate the element residuals and add in to the global residual

getJacobian(jacobian)[source]
calculateElementQuadrature()[source]

Calculate the physical location and weights of the quadrature rules and the shape information at the quadrature points.

This function should be called only when the mesh changes.

calculateElementBoundaryQuadrature()[source]

Calculate the physical location and weights of the quadrature rules and the shape information at the quadrature points on element boundaries.

This function should be called only when the mesh changes.

calculateExteriorElementBoundaryQuadrature()[source]

Calculate the physical location and weights of the quadrature rules and the shape information at the quadrature points on global element boundaries.

This function should be called only when the mesh changes.

estimate_mt()[source]
calculateSolutionAtQuadrature()[source]
calculateAuxiliaryQuantitiesAfterStep()[source]
getForce(cg, forceExtractionFaces, force, moment)[source]