Documentation ¶
Overview ¶
package mporous implements models for porous media based on the Theory of Porous Media
References: [1] Pedroso DM (2015) A consistent u-p formulation for porous media with hysteresis. Int Journal for Numerical Methods in Engineering, 101(8) 606-634 http://dx.doi.org/10.1002/nme.4808 [2] Pedroso DM (2015) A solution to transient seepage in unsaturated porous media. Computer Methods in Applied Mechanics and Engineering, 285 791-816 http://dx.doi.org/10.1016/j.cma.2014.12.009
Index ¶
- func GetPathCycle(pc0 float64, P []float64, np int) (Pc []float64)
- func LogModels()
- type Driver
- type LsVars
- type Model
- func (o Model) CalcLs(res *LsVars, sta *State, pl, divus float64, derivs bool) (err error)
- func (o Model) Ccb(s *State, pc float64) (dsldpc float64, err error)
- func (o Model) Ccd(s *State, pc float64) (dCcdpc float64, err error)
- func (o Model) GetPrms(example bool) fun.Prms
- func (o *Model) Init(prms fun.Prms, cnd mconduct.Model, lrm mreten.Model) (err error)
- func (o Model) NewState(ρL, ρG, pl, pg float64) (s *State, err error)
- func (o Model) Update(s *State, Δpl, Δpg, pl, pg float64) (err error)
- type State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPathCycle ¶
GetPathCycle sets a path with cycles of drying-wetting
pc0 -- initial capillary pressure P -- example: {10, 5, 20, 0} np -- number of points in each branch
Types ¶
type Driver ¶
type Driver struct { // input Mdl *Model // porous model // settings Silent bool // do not show error messages CheckD bool // do check consistent matrix UseDfwd bool // use DerivFwd (forward differences) instead of DerivCen (central differences) when checking D TolCcb float64 // tolerance to check Ccb TolCcd float64 // tolerance to check Ccd VerD bool // verbose check of D // results Res []*State // results }
Driver run simulations with models for porous media
type LsVars ¶
type LsVars struct {
A_ρl, A_ρ, A_p, Cpl, Cvs float64
Dρdpl, Dpdpl, DCpldpl, DCvsdpl, Dklrdpl float64
DρldusM, DρdusM, DCpldusM float64
}
LsVars hold data for liquid-solid computations
type Model ¶
type Model struct { // constants NmaxIt int // max number iterations in Update Itol float64 // iterations tolerance in Update PcZero float64 // minimum value allowed for pc MEtrial bool // perform Modified-Euler trial to start update process ShowR bool // show residual values in Update AllBE bool // use BE for all models, including those that directly implements sl=f(pc) Ncns bool // use non-consistent method for all derivatives (see [1]) Ncns2 bool // use non-consistent method only for second order derivatives (see [1]) // parameters Nf0 float64 // nf0: initial volume fraction of all fluids ~ porosity RhoL0 float64 // ρL0: initial liquid real density RhoG0 float64 // ρG0: initial gas real density RhoS0 float64 // real (intrinsic) density of solids BulkL float64 // liquid bulk moduli at temperature θini RTg float64 // R*Θ*g: initial gas constant Gref float64 // reference gravity, at time of measuring ksat, kgas Pkl float64 // isotrpic liquid saturated conductivity Pkg float64 // isotrpic gas saturated conductivity // derived Cl float64 // liquid compresssibility Cg float64 // gas compressibility Klsat [][]float64 // klsat ÷ Gref Kgsat [][]float64 // kgsat ÷ Gref // conductivity and retention models Cnd mconduct.Model // liquid-gas conductivity models Lrm mreten.Model // retention model // contains filtered or unexported fields }
Model holds material parameters for porous media
References: [1] Pedroso DM (2015) A consistent u-p formulation for porous media with hysteresis. Int Journal for Numerical Methods in Engineering, 101(8) 606-634 http://dx.doi.org/10.1002/nme.4808 [2] Pedroso DM (2015) A solution to transient seepage in unsaturated porous media. Computer Methods in Applied Mechanics and Engineering, 285 791-816 http://dx.doi.org/10.1016/j.cma.2014.12.009
func GetModel ¶
GetModel returns (existent or new) model for porous media
simfnk -- unique simulation filename key matname -- name of material getnew -- force a new allocation; i.e. do not use any model found in database Note: returns nil on errors
func (Model) Ccb ¶
Ccb (Cc-bar) returns dsl/dpc consistent with the update method
See Eq. (54) on page 618 of [1]
func (Model) Ccd ¶
Ccd (Cc-dash) returns dCc/dpc consistent with the update method
See Eqs. (55) and (56) on page 618 of [1]
type State ¶
type State struct { A_ns0 float64 // 1 initial partial fraction of solids A_sl float64 // 2 liquid saturation A_ρL float64 // 3 real (intrinsic) density of liquid A_ρG float64 // 4 real (intrinsic) density of gas A_Δpc float64 // 5 step increment of capillary pressure A_wet bool // 6 wetting flag }
State holds state variables for porous media with liquid and gas
References: [1] Pedroso DM (2015) A consistent u-p formulation for porous media with hysteresis. Int Journal for Numerical Methods in Engineering, 101(8) 606-634 http://dx.doi.org/10.1002/nme.4808 [2] Pedroso DM (2015) A solution to transient seepage in unsaturated porous media. Computer Methods in Applied Mechanics and Engineering, 285 791-816 http://dx.doi.org/10.1016/j.cma.2014.12.009
Click to show internal directories.
Click to hide internal directories.