proteus.mprans.PresInc module

class proteus.mprans.PresInc.NumericalFlux(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions)[source]

Bases: proteus.NumericalFlux.ConstantAdvection_Diffusion_SIPG_exterior

class proteus.mprans.PresInc.Coefficients(rho_f_min=998.0, rho_s_min=998.0, nd=2, VOS_model=0, VOF_model=1, modelIndex=None, fluidModelIndex=None, sedModelIndex=None, fixNullSpace=False, INTEGRATE_BY_PARTS_DIV_U=True, nullSpace='NoNullSpace', initialize=True)[source]

Bases: proteus.TransportCoefficients.TC_base

The coefficients for pressure increment solution

Update is given by

\[\]

ablacdot( -a abla phi^{k+1} - mathbf{q^t}^{k+1} ) = 0

a =

rac{ au (1- heta_s)}{ ho_f} + rac{ au heta_s}{ ho_s}

q^t = (1- heta_s) v_f + heta_s v_s

Construct a coefficients object

Parameters
  • modelIndex – This model’s index into the model list

  • fluidModelIndex – The fluid momentum model’s index

initialize()[source]
attachModels(modelList)[source]

Attach the model for velocity and density to PresureIncrement model

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

initializeGeneralizedInterpolationPointQuadrature(t, cip)[source]

Give the TC object access to the generalized interpolation point storage. These points are used to project nonlinear potentials (phi).

preStep(t, firstStep=False)[source]

Move the current values to values_last to keep cached set of values for bdf1 algorithm

postStep(t, firstStep=False)[source]

Update the fluid velocities

evaluate(t, c)[source]

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

evaluatePresureIncrement(t, c)[source]

Evaluate the coefficients after getting the velocities and densities

class proteus.mprans.PresInc.LevelModel(uDict, phiDict, testSpaceDict, matType, dofBoundaryConditionsDict, dofBoundaryConditionsSetterDict, coefficients, elementQuadrature, elementBoundaryQuadrature, fluxBoundaryConditionsDict=None, advectiveFluxBoundaryConditionsSetterDict=None, diffusiveFluxBoundaryConditionsSetterDictDict=None, stressTraceBoundaryConditionsSetterDict=None, stabilization=None, shockCapturing=None, conservativeFluxDict=None, numericalFluxType=None, TimeIntegrationClass=None, massLumping=False, reactionLumping=False, options=None, name='defaultName', reuse_trial_and_test_quadrature=True, sd=True, movingDomain=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]
calculateCoefficients()[source]
calculateElementResidual()[source]

Calculate all the element residuals

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]
calculateAuxiliaryQuantitiesAfterStep()[source]
calculateSolutionAtQuadrature()[source]
updateAfterMeshMotion()[source]