proteus.mprans.RANS2P module

Optimized Two-Phase Reynolds Averaged Navier-Stokes

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

Bases: proteus.SubgridError.SGE_base

Create a SubgridError object for two-phase incompressible flow

The VMS subgrid error approximation

Parameters:
  • coefficients (proteus.TransportCoefficients.TC_base) – The coefficients object
  • nd (int) – Number of space dimensions
  • lag (bool) – Use prior time step to calculate
  • nStepsToDelay (int) – Lag only after nSteps
  • hFactor (float) – scaling factor based on order
  • noPressureStabilization (bool) – turn off pressure stab
initializeElementQuadrature(mesh, t, cq)[source]

Allocated or set additional arrays for values at element quadrature

Parameters:
updateSubgridErrorHistory(initializationPhase=False)[source]
calculateSubgridError(q)[source]
class proteus.mprans.RANS2P.NumericalFlux(vt, getPointwiseBoundaryConditions, getAdvectiveFluxBoundaryConditions, getDiffusiveFluxBoundaryConditions, getPeriodicBoundaryConditions=None)[source]

Bases: proteus.NumericalFlux.NavierStokes_Advection_DiagonalUpwind_Diffusion_SIPG_exterior

hasInterior = False[source]
class proteus.mprans.RANS2P.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.RANS2P.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, g=[0.0, 0.0, -9.8], nd=3, ME_model=0, LS_model=None, VF_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, porosityTypes=None, killNonlinearDrag=False, waveFlag=None, waveHeight=0.01, waveCelerity=1.0, waveFrequency=1.0, waveNumber=2.0, waterDepth=0.5, Omega_s=[[0.45, 0.55], [0.2, 0.4], [0.0, 1.0]], 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)[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

attachModels(modelList)[source]
initializeMesh(mesh)[source]
initializeElementQuadrature(t, cq)[source]
initializeElementBoundaryQuadrature(t, cebq, cebq_global)[source]
initializeGlobalExteriorElementBoundaryQuadrature(t, cebqe)[source]
updateToMovingDomain(t, c)[source]
evaluateForcingTerms(t, c, mesh=None, mesh_trial_ref=None, mesh_l2g=None)[source]
evaluate(t, c)[source]
preStep(t, firstStep=False)[source]
postStep(t, firstStep=False)[source]
TwophaseNavierStokes_ST_LS_SO_2D_Evaluate()[source]

evaluate the coefficients of the 2D Navier-Stokes equations with surface tension

TwophaseNavierStokes_ST_LS_SO_2D_Evaluate_sd()[source]

evaluate the coefficients of the 2D Navier-Stokes equations with surface tension

TwophaseNavierStokes_ST_LS_SO_3D_Evaluate()[source]

evaluate the coefficients of the 3D Navier-Stokes equations with surface tension

TwophaseNavierStokes_ST_LS_SO_3D_Evaluate_sd()[source]

evaluate the coefficients of the 3D Navier-Stokes equations with surface tension

calculateWaveFunction3d_ref()[source]

generate continuity source term for driving waves following Liu etal

class proteus.mprans.RANS2P.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='RANS2P', reuse_trial_and_test_quadrature=True, sd=True, movingDomain=False)[source]

Bases: proteus.Transport.OneLevelTransport

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]
proteus.mprans.RANS2P.getErgunDrag(porosity, meanGrainSize, viscosity)[source]