proteus.mprans.RANS3PSed module

class proteus.mprans.RANS3PSed.SubgridError(coefficients, nd, lag=False, nStepsToDelay=0, hFactor=1.0, noPressureStabilization=False)[source]

Bases: proteus.SubgridError.SGE_base

initializeElementQuadrature(mesh, t, cq)[source]
updateSubgridErrorHistory(initializationPhase=False)[source]
calculateSubgridError(q)[source]
class proteus.mprans.RANS3PSed.NumericalFlux(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions=None)[source]

Bases: proteus.NumericalFlux.NavierStokes_Advection_DiagonalUpwind_Diffusion_SIPG_exterior

hasInterior = False[source]
class proteus.mprans.RANS3PSed.ShockCapturing(coefficients, nd, shockCapturingFactor=0.25, lag=False, nStepsToDelay=3)[source]

Bases: proteus.ShockCapturing.ShockCapturing_base

initializeElementQuadrature(mesh, t, cq)[source]
updateShockCapturingHistory()[source]
class proteus.mprans.RANS3PSed.Coefficients(epsFact=1.5, sigma=72.8, rho_0=998.2, nu_0=1.004e-06, rho_1=1.205, nu_1=1.5e-05, rho_s=2600.0, g=[0.0, 0.0, -9.8], nd=3, ME_model=5, PRESSURE_model=7, FLUID_model=6, VOS_model=0, CLSVOF_model=None, LS_model=None, VOF_model=None, KN_model=None, Closure_0_model=None, Closure_1_model=None, epsFact_density=None, stokes=False, sd=True, movingDomain=False, useVF=0.0, useRBLES=0.0, useMetrics=0.0, useConstant_he=False, dragAlpha=0.0, dragBeta=0.0, setParamsFunc=None, dragAlphaTypes=None, dragBetaTypes=None, vosTypes=None, killNonlinearDrag=False, epsFact_source=1.0, epsFact_solid=None, eb_adjoint_sigma=1.0, eb_penalty_constant=10.0, forceStrongDirichlet=False, turbulenceClosureModel=0, smagorinskyConstant=0.1, barycenters=None, PSTAB=0.0, aDarcy=150.0, betaForch=0.0, grain=0.0102, packFraction=0.2, packMargin=0.01, maxFraction=0.635, frFraction=0.57, sigmaC=1.1, C3e=1.2, C4e=1.0, eR=0.8, fContact=0.02, mContact=2.0, nContact=5.0, angFriction=0.5235987755982988, vos_function=None, staticSediment=False, vos_limiter=0.05, mu_fr_limiter=1.0)[source]

Bases: proteus.TransportCoefficients.TC_base

The coefficients for two incompresslble fluids governed by the Navier-Stokes equations and separated by a sharp interface represented by a level set function

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.

TwophaseNavierStokes_ST_LS_SO_2D_Evaluate()[source]
TwophaseNavierStokes_ST_LS_SO_3D_Evaluate()[source]
TwophaseNavierStokes_ST_LS_SO_2D_Evaluate_sd()[source]
TwophaseNavierStokes_ST_LS_SO_3D_Evaluate_sd()[source]
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.RANS3PSed.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='RANS3PSed', 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]
getResidual(u, r)[source]

Calculate the element residuals and add in to the global residual

getJacobian(jacobian)[source]
calculateElementQuadrature(domainMoved=False)[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(domainMoved=False)[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(domainMoved=False)[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]
updateAfterMeshMotion()[source]