proteus.TransportCoefficients module
Classes for implementing the coefficients of transport equations.
TC_base defines the interface. The classes derived from TC_base in this module define common PDE’s.
- class proteus.TransportCoefficients.TC_base(nc=2, mass={}, advection={}, diffusion={}, potential={}, reaction={}, hamiltonian={}, variableNames=None, stress={}, sparseDiffusionTensors={}, useSparseDiffusion=True, movingDomain=False)[source]
Bases:
object
This is the base class for coefficients of the vector transport equation with nc components. The coefficients and their derivative are evaluated at a time t over an array of solution values, u, at an array of points x.
methods:
evaluate(t,c) – t, time, is a float, c is a dictionary of x,u, and coefficients
members:
nc – (number of components) integer mass – ({{}} logically nc x nc) ‘linear’ or ‘nonlinear’ advection – ({{}} logically nc x nc) ‘constant’, ‘linear’ or ‘nonlinear’ diffusion – ({{{}}} logically nc x nc x nc) ‘constant’ or ‘nonlinear’ potential – ({{}} logically nc x nc) ‘u’ or ‘nonlinear’ reaction – ({{}} logically nc x nc) ‘constant’,’linear’, or ‘nonlinear’ hamiltonian – ({{}} logically nx x nc) ‘linear’ or ‘nonlinear’ stencil – ([set(),] nc x nc) indicates jacobian block structure variableNames – (number of components) string describing the component
These dictionaries indicate which coefficients are nonzero and how the non-zero coefficietns depend on the solution variables. The dictionaries will be used like sparse multi-dimensional arrays. These flags are used to deduce the terms in the PDE and allow optimizations in special cases. Non-existant values imply that the equation for that component has no term corresponding to the given coefficient.
\[\]a_{i,j} = 1
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.
- evaluate(t, c)[source]
Evaluate the coefficients at a given time, t, using the coefficient storage passed in as the dictionary c.
- 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).
- 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)
- 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.TransportCoefficients.LinearVADR_ConstantCoefficients(nc=1, M=[0], A=[0], B=[0], C=[0], rFunc=None, useSparseDiffusion=True)[source]
Bases:
proteus.TransportCoefficients.TC_base
This class implements constant coefficients with no cross-component diffusion for a system of advection-diffuion-reaction 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.
- class proteus.TransportCoefficients.LinearVADR_ConstantCoefficients_skew(nc=1, M=0, A=0, B=0, C=0)[source]
Bases:
proteus.TransportCoefficients.TC_base
This class implements constant coefficients for a skew symmetric system, mainly for testing and debugging
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.
- class proteus.TransportCoefficients.LinearVADR_ConstantCoefficients_upper(nc=1, M=0, A=0, B=0, C=0)[source]
Bases:
proteus.TransportCoefficients.TC_base
This class implements constant coefficients with upper diagonal coupling
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.
- class proteus.TransportCoefficients.LinearVADR_ConstantCoefficients_lower(nc=1, M=0, A=0, B=0, C=0)[source]
Bases:
proteus.TransportCoefficients.TC_base
This class implements constant coefficients with lower diagonal coupling
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.
- class proteus.TransportCoefficients.LinearVADR_ConstantCoefficients_full(nc=1, M=0, A=0, B=0, C=0)[source]
Bases:
proteus.TransportCoefficients.TC_base
This class implements constant coefficients with full coupling
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.
- class proteus.TransportCoefficients.NonlinearVADR_pqrst(nc=1, M={0: 0.0}, A={0: 1.0}, B={0: 0.0}, C={0: 0.0}, p={0: 1.0}, q={0: 1.0}, r={0: 1.0}, s={0: 1.0}, t={0: 0.0})[source]
Bases:
proteus.TransportCoefficients.TC_base
This class implements simple monomial nonlinear coefficients with no cross-component diffusion for a system of advection-diffuion-reaction 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.
- class proteus.TransportCoefficients.NonlinearVADR_pqrst_full(nc=1, M={0: 0.0}, A={0: 1.0}, B={0: 0.0}, C={0: 0.0}, p={0: 1.0}, q={0: 1.0}, r={0: 1.0}, s={0: 1.0}, t={0: 0.0})[source]
Bases:
proteus.TransportCoefficients.TC_base
This class implements the simple nonlinear ADR equation with full coupling
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.
- class proteus.TransportCoefficients.UnitSquareRotation[source]
Bases:
proteus.TransportCoefficients.TC_base
Conservative linear advection with a rotating velocity field
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.
- class proteus.TransportCoefficients.UnitCubeRotation[source]
Bases:
proteus.TransportCoefficients.TC_base
Conservative linear advection with a rotating velocity field in 3d
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.
Bases:
proteus.TransportCoefficients.TC_base
The coefficients for the incompressible Navier-Stokes 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.
Evaluate the coefficients at a given time, t, using the coefficient storage passed in as the dictionary c.
- class proteus.TransportCoefficients.ShallowWater(g=9.8, nd=1, h_eps=1e-08, bedFrictionCoefficient=0.0, bedFrictionPower=1.0, bathymetryFunc=None, bathymetryGradientFunc=None, eddyViscosity=0.0)[source]
Bases:
proteus.TransportCoefficients.TC_base
The coefficients for the shallow water equations.
Right hand side for bed friction looks like \(-\tau_b/\rho\) where the bed friction stress is
\[\tau_b = \rho C_f \vec u \|\vec u\| C_f = g b/h^{a}\]\(b = n^2\) for Mannings law –> bedFrictionCoefficient \(a = 1/3\) for Mannings law –> bedFrictionPower
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.
- 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
- class proteus.TransportCoefficients.DiscreteLaplaceOperator(nd=2, nu=1.0)[source]
Bases:
proteus.TransportCoefficients.TC_base
A coefficient class to construct the discrete Laplace Operator.
This class defines the coefficients necessary to construct the discrete Laplace operator \(A\) where
\[a^{c}_{i,j} = \int_{T} \nabla \phi^{c}_{i} \cdot \nabla \phi^{c}_{j} dT\]for all \(T \in \Omega\), \(c=1,...,nc\) and \(\phi^{c}_{i}, i=1,...,k\) is a basis for component \(c\).
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.
- class proteus.TransportCoefficients.Stokes(rho=998.2, nu=1.004e-06, g=[0.0, 9.8], nd=2, steady=True, weakBoundaryConditions=True)[source]
Bases:
proteus.TransportCoefficients.TC_base
The coefficients for the Stokes 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.
- class proteus.TransportCoefficients.StokesP(rho=998.2, nu=1.004e-06, g=[0.0, 9.8], nd=2, steady=True)[source]
Bases:
proteus.TransportCoefficients.TC_base
The coefficients for the Stokes 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.
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.
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)
Give the TC object access to the mesh for any mesh-dependent information.
Give the TC object access to the element quadrature storage
Give the TC object access to the element boundary quadrature storage
Give the TC object access to the exterior element boundary quadrature storage
Evaluate the coefficients at a given time, t, using the coefficient storage passed in as the dictionary c.
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.
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)
Give the TC object access to the mesh for any mesh-dependent information.
Give the TC object access to the element quadrature storage
Give the TC object access to the element boundary quadrature storage
Give the TC object access to the exterior element boundary quadrature storage
Evaluate the coefficients at a given time, t, using the coefficient storage passed in as the dictionary c.
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.
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)
Give the TC object access to the mesh for any mesh-dependent information.
Give the TC object access to the element quadrature storage
Give the TC object access to the element boundary quadrature storage
Give the TC object access to the exterior element boundary quadrature storage
Evaluate the coefficients at a given time, t, using the coefficient storage passed in as the dictionary c.
- class proteus.TransportCoefficients.TwophaseStokes_LS_SO(epsFact=1.5, rho_0=998.2, nu_0=1.005e-06, rho_1=1.205, nu_1=1.5e-05, g=[0.0, - 9.8], nd=2, LS_model=1, steady=False)[source]
Bases:
proteus.TransportCoefficients.TC_base
The coefficients for two incompresslble fluids governed by the Stokes equations and seperated 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.
- 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
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 volume of fluid (volume fraction) 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.
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)
Give the TC object access to the mesh for any mesh-dependent information.
Give the TC object access to the element quadrature storage
Give the TC object access to the element boundary quadrature storage
Give the TC object access to the exterior element boundary quadrature storage
Evaluate the coefficients at a given time, t, using the coefficient storage passed in as the dictionary c.
- class proteus.TransportCoefficients.TwophaseStokes_VOF_SO(epsFact=1.5, rho_0=998.2, nu_0=1.005e-06, rho_1=1.205, nu_1=1.5e-05, g=[0.0, 9.8], nd=2, LS_model=1, steady=False)[source]
Bases:
proteus.TransportCoefficients.TC_base
The coefficients for two incompresslble fluids governed by the Stokes equations and seperated by a sharp interface represented by a volume of fluid 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.
- 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
- class proteus.TransportCoefficients.NCLevelSetCoefficients(V_model=0, RD_model=None, ME_model=1, checkMass=True, epsFact=1.5)[source]
Bases:
proteus.TransportCoefficients.TC_base
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)
- 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
- preStep(t, firstStep=False)[source]
Give the TC object an opportunity to modify itself before the time step.
- class proteus.TransportCoefficients.CLevelSetCoefficients(V_model=0, RD_model=- 1, ME_model=1, checkMass=True)[source]
Bases:
proteus.TransportCoefficients.TC_base
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)
- 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
- preStep(t, firstStep=False)[source]
Give the TC object an opportunity to modify itself before the time step.
- class proteus.TransportCoefficients.VOFCoefficients(LS_model=- 1, V_model=0, RD_model=- 1, ME_model=1, checkMass=True, epsFact=0.0)[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- initializeMesh(mesh)[source]
Give the TC object access to the mesh for any mesh-dependent information.
- 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)
- 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
- preStep(t, firstStep=False)[source]
Give the TC object an opportunity to modify itself before the time step.
- class proteus.TransportCoefficients.LevelSetNormalCoefficients(epsFact=1.5, LSModel_index=- 1, phi_func=None)[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- initializeMesh(mesh)[source]
Give the TC object access to the mesh for any mesh-dependent information.
- 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)
- 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
- class proteus.TransportCoefficients.LevelSetCurvatureCoefficients(epsFact=0.0, LSModel_index=3, grad_phi_func=None, sd=True, nd=None)[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- initializeMesh(mesh)[source]
Give the TC object access to the mesh for any mesh-dependent information.
- 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)
- 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
- class proteus.TransportCoefficients.LevelSetConservation(applyCorrection=True, epsFactHeaviside=0.0, epsFactDirac=1.0, epsFactDiffusion=2.0, LSModel_index=3, V_model=2, me_model=5, VOFModel_index=4, checkMass=True, sd=True, nd=None, applyCorrectionToDOF=True)[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- initializeMesh(mesh)[source]
Give the TC object access to the mesh for any mesh-dependent information.
- 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)
- 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
- preStep(t, firstStep=False)[source]
Give the TC object an opportunity to modify itself before the time step.
- class proteus.TransportCoefficients.ConservativeHeadRichardsL2projMualemVanGenuchten(hydraulicConductivity, gravity, density, thetaS, thetaR, alpha, n, m)[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- class proteus.TransportCoefficients.ConservativeHeadRichardsL2projMualemVanGenuchtenBlockHet(hydraulicConductivity, gravity, density, setParamsFunc)[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- 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
- class proteus.TransportCoefficients.ConservativeHeadRichardsMualemVanGenuchten(hydraulicConductivity, gravity, density, thetaS, thetaR, alpha, n, m, beta=0.0)[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- class proteus.TransportCoefficients.ConservativeSatRichardsMualemVanGenuchten(hydraulicConductivity, gravity, density, thetaS, thetaR, alpha, n, m)[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- class proteus.TransportCoefficients.ConservativeTotalHeadRichardsMualemVanGenuchten(hydraulicConductivity, gravity, density, thetaS, thetaR, alpha, n, m)[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- class proteus.TransportCoefficients.ConservativeHeadRichardsBrooksCoreyBurdine(hydraulicConductivity, gravity, density, thetaS, thetaR, lambdab, pd, beta=0.0)[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- class proteus.TransportCoefficients.ConservativeHeadRichardsMualemVanGenuchtenHet(hydraulicConductivity, gravity, density, thetaS, thetaR, alpha, n, m)[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- 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
- class proteus.TransportCoefficients.ConservativeHeadRichardsBrooksCoreyBurdineHet(hydraulicConductivity, gravity, density, setParamsFunc)[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- 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
- class proteus.TransportCoefficients.ConservativeHeadRichardsMualemVanGenuchtenBlockHet(hydraulicConductivity, gravity, density, setParamsFunc)[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- 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
- class proteus.TransportCoefficients.ConservativeHeadRichardsMualemVanGenuchtenBlockHetV2(Ks_block, vgm_n_block, vgm_alpha_block, thetaR_block, thetaSR_block, gravity, density, beta)[source]
Bases:
proteus.TransportCoefficients.TC_base
version of Re where element material type id’s used in evals
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.
- 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
- class proteus.TransportCoefficients.SeepageBrezis(Ks_block, vgm_n_block, vgm_alpha_block, thetaR_block, thetaSR_block, gravity, density, beta, epsFact=1.5)[source]
Bases:
proteus.TransportCoefficients.TC_base
version of Re where element material type id’s used in evals
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.
- 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
- class proteus.TransportCoefficients.ConservativeHeadRichardsJLeverett(phi_block, psiD_block, ns_block, nk_block, S_wirr_block, S_nwr_block, kr0_block, gravity, density, beta)[source]
Bases:
proteus.TransportCoefficients.TC_base
version of Re where element material type id’s used in evals
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.
- 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
- class proteus.TransportCoefficients.ConservativeHeadRichardsJLeverettAni(phi_block, psiD_block, ns_block, nk_block, S_wirr_block, S_nwr_block, kr0x_block, kr0y_block, kr0z_block, gravity, density, beta)[source]
Bases:
proteus.TransportCoefficients.TC_base
version of Re where element material type id’s used in evals
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.
- 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
- class proteus.TransportCoefficients.ConstantVelocityLevelSet(b=[1.0, 0.0], lsModelId=0)[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- class proteus.TransportCoefficients.UnitSquareVortexLevelSet[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- class proteus.TransportCoefficients.RotatingVelocityLevelSet[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- class proteus.TransportCoefficients.EikonalEquationCoefficients(rhsval=1.0)[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- class proteus.TransportCoefficients.RedistanceLevelSet(applyRedistancing=True, epsFact=2.0, nModelId=None, u0=None, rdModelId=0, penaltyParameter=0.0)[source]
Bases:
proteus.TransportCoefficients.TC_base
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
- 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.TransportCoefficients.RedistanceLevelSetWithWeakPenalty(applyRedistancing=True, epsFact=2.0, penaltyParameter=1.0, nModelId=None, u0=None, rdModelId=0)[source]
Bases:
proteus.TransportCoefficients.RedistanceLevelSet
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.
- class proteus.TransportCoefficients.RedistanceLevelSetSandF(applyRedistancing=True, epsFact=2.0, nModelId=1, u0=None, rdModelId=- 1, vofModelId=4, massCorrModelId=5, checkMass=True)[source]
Bases:
proteus.TransportCoefficients.RedistanceLevelSet
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.
- class proteus.TransportCoefficients.ConservativeHead2PMualemVanGenuchten(hydraulicConductivity, gravity, density, thetaS, thetaR, alpha, n, m)[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- class proteus.TransportCoefficients.PoissonEquationCoefficients(aOfX, fOfX, nc=1, nd=2, l2proj=None, timeVaryingCoefficients=False)[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- 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
- class proteus.TransportCoefficients.LinearElasticity(E=1.0, nu=0.75, g=[0.0, 9.8], nd=2)[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- class proteus.TransportCoefficients.MovingMesh(E=1.0, nu=0.3, g=[0.0, 0.0], nd=2, moveMesh=True)[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- initializeMesh(mesh)[source]
Give the TC object access to the mesh for any mesh-dependent information.
- 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)
- class proteus.TransportCoefficients.kEpsilon(flowModelID=0, nd=2, c_mu=0.09, c_1=0.126, c_2=1.92, c_epsilon=0.07, sigma_k=1.0, sigma_e=1.29, g=[0.0, - 9.8], nu=1.004e-06, rho=998.0)[source]
Bases:
proteus.TransportCoefficients.TC_base
Basic k-epsilon model for incompressible flow from Hutter etal Chaper 11
\(\bar{\vec v} = <\vec v>\) Reynolds-averaged (mean) velocity \(\vec v^{'} =\) turbulent fluctuation
assume \(\vec v = <\vec v> + \vec v^{'}\), with \(<\vec v^{'}> = 0\)
Reynolds averaged NS equations
\[\deld \bar{\vec v} = 0\]\[\pd{\bar{\vec v}}{t} + \deld \left(\bar{\vec v} \outer \bar{\vec v}\right) -\nu \deld \ten \bar{D} + \frac{1}{\rho}\grad \bar p - \frac{1}{rho}\deld \ten{R} = 0\]Reynolds stress term
\[\ten R = -\rho <\vec v^{'}\outer \vec v^{'}> \frac{1}{\rho}\ten{R} = 2 \nu_t \bar{D} - \frac{2}{3}k\ten{I} D_{ij}(\vec v) = \frac{1}{2} \left( \pd{v_i}{x_j} + \pd{v_j}{x_i}) \ten D \bar{\ten D} = D(<\vec v>), \ten D^{'} = \ten D(\vec v^{'})\]k-epsilon tranport equations
\[\pd{k}{t} + \deld (k\bar{\vec v}) - \deld\left[\left(\frac{\nu_t}{\sigma_k} + \nu\right)\grad k \right] - 4\nu_t \Pi_{D} + \epsilon = 0\]\[\pd{\varepsilon}{t} + \deld (\varepsilon \bar{\vec v}) - \deld\left[\left(\frac{\nu_t}{\sigma_\varepsilon} + \nu\right)\grad \varepsilon \right] - 4c_1 k \Pi_{D} + c_2 \frac{\epsilon^2}{k} = 0\]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
- class proteus.TransportCoefficients.kEpsilon_k(flowModelID=0, epsilonModelID=2, nd=2, c_mu=0.09, sigma_k=1.0, g=[0.0, - 9.8], nu=1.004e-06, rho=998.0)[source]
Bases:
proteus.TransportCoefficients.TC_base
Basic k-epsilon model for incompressible flow from Hutter etal Chaper 11 but solves for just k assuming epsilon computed independently and lagged in time
\(\bar{\vec v} = <\vec v>\) Reynolds-averaged (mean) velocity
\(\vec v^{'} =\) turbulent fluctuation
assume \(\vec v = <\vec v> + \vec v^{'}\), with \(<\vec v^{'}> = 0\)
Reynolds averaged NS equations
\[\deld \bar{\vec v} = 0 \pd{\bar{\vec v}}{t} + \deld \left(\bar{\vec v} \outer \bar{\vec v}\right) -\nu \deld \ten \bar{D} + \frac{1}{\rho}\grad \bar p - \frac{1}{rho}\deld \ten{R} = 0\]Reynolds stress term
\[\ten R = -\rho <\vec v^{'}\outer \vec v^{'}> \frac{1}{\rho}\ten{R} = 2 \nu_t \bar{D} - \frac{2}{3}k\ten{I} D_{ij}(\vec v) = \frac{1}{2} \left( \pd{v_i}{x_j} + \pd{v_j}{x_i}) \ten D \bar{\ten D} = D(<\vec v>), \ten D^{'} = \ten D(\vec v^{'})\]k-epsilon tranport equations
\[\pd{k}{t} + \deld (k\bar{\vec v}) - \deld\left[\left(\frac{\nu_t}{\sigma_k} + \nu\right)\grad k \right] - 4\nu_t \Pi_{D} + \epsilon = 0 \pd{\varepsilon}{t} + \deld (\varepsilon \bar{\vec v}) - \deld\left[\left(\frac{\nu_t}{\sigma_\varepsilon} + \nu\right)\grad \varepsilon \right] - 4c_1 k \Pi_{D} + c_2 \frac{\epsilon^2}{k} = 0\]\(k\) – turbulent kinetic energy = <vec v^{‘}dot vec v^{‘}> \(\varepsilon\) – turbulent dissipation rate = 4 nu <Pi_{D^{‘}}> \(\nu\) – kinematic viscosity (mu/rho) \(\nu_t\) – turbulent viscosity = c_mu frac{k^2}{varepsilon}
\[\Pi_{\ten A} = \frac{1}{2}tr(\ten A^2) = 1/2 \ten A\cdot \ten A \ten D \cdot \ten D = \frac{1}{4}\left[ (4 u_x^2 + 4 v_y^2 + 1/2 (u_y + v_x)^2 \right] 4 \Pi_{D} = 2 \frac{1}{4}\left[ (4 u_x^2 + 4 v_y^2 + 1/2 (u_y + v_x)^2 \right] = \left[ (2 u_x^2 + 2 v_y^2 + (u_y + v_x)^2 \right]\]\(\sigma_k\) – Prandtl number approx 1 \(\sigma_e\) – c_{mu}/c_e
\[c_{\mu} = 0.09, c_1 = 0.126, c_2 = 1.92, c_{\varepsilon} = 0.07\]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
- class proteus.TransportCoefficients.kEpsilon_epsilon(flowModelID=0, kModelID=1, nd=2, c_mu=0.09, c_1=0.126, c_2=1.92, c_epsilon=0.07, sigma_e=1.29, g=[0.0, - 9.8], nu=1.004e-06, rho=998.0)[source]
Bases:
proteus.TransportCoefficients.TC_base
Basic k-epsilon model for incompressible flow from Hutter etal Chaper 11 but solves for just epsilon assuming k lagged
\(\bar{\vec v} = <\vec v>\) Reynolds-averaged (mean) velocity
\(\vec v^{'}\) = turbulent fluctuation
assume \(\vec v = <\vec v> + \vec v^{'}\), with \(<\vec v^{'}> = 0\)
Reynolds averaged NS equations
\[\deld \bar{\vec v} = 0 \pd{\bar{\vec v}}{t} + \deld \left(\bar{\vec v} \outer \bar{\vec v}\right) -\nu \deld \ten \bar{D} + \frac{1}{\rho}\grad \bar p - \frac{1}{rho}\deld \ten{R} = 0\]Reynolds stress term
\[\ten R = -\rho <\vec v^{'}\outer \vec v^{'}> \frac{1}{\rho}\ten{R} = 2 \nu_t \bar{D} - \frac{2}{3}k\ten{I} D_{ij}(\vec v) = \frac{1}{2} \left( \pd{v_i}{x_j} + \pd{v_j}{x_i}) \ten D \bar{\ten D} = D(<\vec v>), \ten D^{'} = \ten D(\vec v^{'})\]k-epsilon tranport equations
\[\pd{k}{t} + \deld (k\bar{\vec v}) - \deld\left[\left(\frac{\nu_t}{\sigma_k} + \nu\right)\grad k \right] - 4\nu_t \Pi_{D} + \epsilon = 0\]\[\pd{\varepsilon}{t} + \deld (\varepsilon \bar{\vec v}) - \deld\left[\left(\frac{\nu_t}{\sigma_\varepsilon} + \nu\right)\grad \varepsilon \right] - 4c_1 k \Pi_{D} + c_2 \frac{\epsilon^2}{k} = 0\]\(k\) – turbulent kinetic energy = <vec v^{‘}dot vec v^{‘}> \(\varepsilon\) – turbulent dissipation rate = 4 nu <Pi_{D^{‘}}> \(\nu\) – kinematic viscosity (mu/rho) \(\nu_t\) – turbulent viscosity = c_mu frac{k^2}{varepsilon}
\[ \begin{align}\begin{aligned}\Pi_{\ten A} = \frac{1}{2}tr(\ten A^2) = 1/2 \ten A\cdot \ten A \ten D \cdot \ten D = \frac{1}{4}\left[ (4 u_x^2 + 4 v_y^2 + 1/2 (u_y + v_x)^2 \right]\\ 4 \Pi_{D} = 2 \frac{1}{4}\left[ (4 u_x^2 + 4 v_y^2 + 1/2 (u_y + v_x)^2 \right] = \left[ (2 u_x^2 + 2 v_y^2 + (u_y + v_x)^2 \right]\end{aligned}\end{align} \]\(\sigma_k\) – Prandtl number approx 1 \(\sigma_e\) – \(c_{\mu}/c_e\)
:math:c_{mu} = 0.09, c_1 = 0.126, c_2 = 1.92, c_{varepsilon} = 0.07`
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
Bases:
proteus.TransportCoefficients.TwophaseNavierStokes_ST_LS_SO
The coefficients for incompresslble fluid governed by the Navier-Stokes equations assuming k-epsilon model for turbulence
KEmodelID = [m1,m2] if using two separate models for k and epsilon otherwise should be just an integer id
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.
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)
Give the TC object access to the mesh for any mesh-dependent information.
Give the TC object access to the element quadrature storage
Give the TC object access to the element boundary quadrature storage
Give the TC object access to the exterior element boundary quadrature storage
Evaluate the coefficients at a given time, t, using the coefficient storage passed in as the dictionary c.
Bases:
proteus.TransportCoefficients.TwophaseNavierStokes_ST_LS_SO
The coefficients for incompresslble fluid governed by the Navier-Stokes equations assuming k-epsilon model for turbulence
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.
Bases:
proteus.TransportCoefficients.TwophaseNavierStokes_ST_LS_SO
The coefficients for incompresslble fluid governed by the Navier-Stokes equations assuming k-epsilon model for turbulence
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.
Give the TC object access to the mesh for any mesh-dependent information.
Give the TC object access to the element quadrature storage
Give the TC object access to the element boundary quadrature storage
Give the TC object access to the exterior element boundary quadrature storage
Give the TC object an opportunity to modify itself before the time step.
Evaluate the coefficients at a given time, t, using the coefficient storage passed in as the dictionary c.
- class proteus.TransportCoefficients.ViscousBurgersEqn(v=[1.0, 0.0, 0.0], nu=0.0, nc=1, nd=3, useHJ=False)[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- class proteus.TransportCoefficients.BuckleyLeverettLiuExample(nu=0.0, nc=1, nd=2)[source]
Bases:
proteus.TransportCoefficients.TC_base
5 spot example from Liu 93 Siam paper.
S_t + deld (
ec a f(S)) = 0
f(S) = S^2 / (0.2 - 0.4 S + 1.2 S^2)
ec a = (pd{phi}{x},pd{phi}{y})
phi = 0.01 log(sqrt{x^2 + y^2})
However, note that his example is for S=0 injecting into S=1 background saturation using his definition of f
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.
Bases:
proteus.TransportCoefficients.TC_base
The coefficients for incompressible fluid in a porous domain governed by the Navier-Stokes 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.
Give the TC object access to the mesh for any mesh-dependent information.
Give the TC object access to the element quadrature storage
Give the TC object access to the element boundary quadrature storage
Give the TC object access to the exterior element boundary quadrature storage
Give the TC object access to the generalized interpolation point storage. These points are used to project nonlinear potentials (phi).
Evaluate the coefficients at a given time, t, using the coefficient storage passed in as the dictionary c.
Bases:
proteus.TransportCoefficients.TwophaseReynoldsAveragedNavierStokes_AlgebraicClosure
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.
Give the TC object access to the mesh for any mesh-dependent information.
Give the TC object access to the element quadrature storage
Give the TC object access to the element boundary quadrature storage
Give the TC object access to the exterior element boundary quadrature storage
Give the TC object an opportunity to modify itself before the time step.
Evaluate the coefficients at a given time, t, using the coefficient storage passed in as the dictionary c.
- class proteus.TransportCoefficients.VolumeAveragedVOFCoefficients(LS_model=- 1, V_model=0, RD_model=- 1, ME_model=1, checkMass=True, epsFact=0.0, setParamsFunc=None)[source]
Bases:
proteus.TransportCoefficients.VOFCoefficients
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.
- class proteus.TransportCoefficients.GroundwaterTransportCoefficients(nc=1, omega=0.3, alpha_L=1.0, alpha_T=0.2, d=1.3e-09)[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- class proteus.TransportCoefficients.GroundwaterBiodegradation01Coefficients(omega=0.3, alpha_L=1.0, alpha_T=0.2, d_c=1.3e-09, d_e=1.3e-09, Kox_max=100.0, Kox_C=0.1, Kox_E=0.1, Kox_X=0.0035, Yield=0.05, k_d=0.0)[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- class proteus.TransportCoefficients.GroundwaterBryantDawsonIonExCoefficients(omega=0.3, alpha_L=1.0, alpha_T=0.2, d_m=1.3e-09, d_h=1.3e-09, K_m=1.0, K_h=1.0, K_w=1.0, Z_tot=100.0)[source]
Bases:
proteus.TransportCoefficients.TC_base
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.
- class proteus.TransportCoefficients.ConservativeHeadRichardsMualemVanGenuchtenBlockHetV2withUpwind(nd, Ks_block, vgm_n_block, vgm_alpha_block, thetaR_block, thetaSR_block, gravity, density, beta, upwindFlag=0, sd=False)[source]
Bases:
proteus.TransportCoefficients.TC_base
version of Re where element material type id’s used in evals
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.
- 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
- class proteus.TransportCoefficients.DiffusiveWave_1D(alpha=1.6666666666666667, gamma=0.5, epsilon=1e-06, bathymetryFunc=None, reactionFunc=None, analyticalSoln=None)[source]
Bases:
proteus.TransportCoefficients.TC_base
Construct a coefficients object given the parameters of the Manning/Chezy formula and the regularization parameter.
Optionally provide a function for bathymetry, right hand side (source), and an analytical solution. The
- initializeElementQuadrature(t, cq)[source]
Set the y component of the element quadrature points using the bathymetry function.
- initializeElementBoundaryQuadrature(t, cebq, cebq_global)[source]
Set the y component of the element boundary quadrature points using the bathymetry function.
- initializeGlobalExteriorElementBoundaryQuadrature(t, cebqe)[source]
Set the y component of the exterior element boundary quadrature points using the bathymetry function.
- class proteus.TransportCoefficients.DiffusiveWave_2D(nd=2, alpha=1.6666666666666667, gamma=0.5, epsilon=1e-06, bathymetryFunc=None, bathymetryGradientFunc=None)[source]
Bases:
proteus.TransportCoefficients.TC_base
Construct a coefficients object given the parameters of the Manning/Chezy formula and the regularization parameter.
Optionally provide a function for bathymetry, right hand side (source), and an analytical solution. The
- 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
- class proteus.TransportCoefficients.DiscreteMassMatrix(rho=1.0, nd=2)[source]
Bases:
proteus.TransportCoefficients.TC_base
Coefficients class for the discrete Mass Operator.
This class defines the coefficients necessary to construct the discrete mass operator \(A\) where
\[a^{c}_{i,j} = \int_{T} \phi^{c}_{i} \phi^{c}_{j} dT\]for all \(T \in \Omega\), \(c=1,...,nc\) and \(\phi^{c}_{i}, i=1,...,k\) is a basis for component \(c\).
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.
- class proteus.TransportCoefficients.DiscreteTwoPhaseAdvectionOperator(u, nd=2, rho_0=1.0, nu_0=1.0, rho_1=1.0, nu_1=1.0, eps=1e-08, LS_model=None, phase_function=None)[source]
Bases:
proteus.TransportCoefficients.TC_base
A coefficient class to build the discrete advection operator.
This class defines the coefficients necessary to construct the discrete advection operator \(N\) where
\[n^{c}_{i,j} = \int_{T} (\mathbf{w}_{h} \phi_{j}) \cdot \nabla \phi_{i} d T\]for all \(T \in \Omega\), \(c = 0,...nc-1\) and \(phi^{c}_{i}\), i=0,cdot k-1 is a basis component for \(c\). Also note, \(\mathbf{w}_{h}\) is a vector field (often the solution from the last non-linear iteration).
- Parameters
nd (int) – The dimension of the physical domain
u (numpy array) – An array of arrays with the advective field evaluated at the quadrature points.
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.