Mushy Layer  1.0
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
MushyLayerParams Class Reference

Class to handle the physical parameters of a mushy layer simulation. More...

#include <MushyLayerParams.h>

Public Types

enum  nondimensionalisations {
  m_diffusiveTime_advectiveVel, m_darcyTime_advectiveVel, m_darcyTime_darcyVel, m_advectiveTime_darcyVel,
  m_buoyancyTime_advectiveVel, m_num_nondimensionalisations
}
 Different options for nondimensionalisation. More...
 
enum  timeDependentBCtypes { m_constant, m_sinusoid, m_custom }
 Possible time dependences for BCs. More...
 

Public Member Functions

 MushyLayerParams ()
 Default constructor.
 
virtual ~MushyLayerParams ()
 Default destructor.
 
void getParameters ()
 Get all parameters from the inputs file.
 
void printParameters ()
 Write out parameters to the command line (pout)
 
Real directionalSolidificationMushyZ (Real theta, Real zEutectic=1.0)
 Calculate $ z(\theta) $ for the directional solidification without flow benchmark.
 
void parseBCs (string a_name, Vector< int > *a_bcHolder, bool required=false)
 Read in BCs from the inputs file. More...
 
void parseBCVals (string a_name, RealVect &a_bcHolder, bool required=false)
 Read in BC vals from inputs file.
 
Real tempTotheta (const Real T)
 Convert dimensional to non-dimensional temperature.
 
Real concToTheta (const Real C)
 Convert dimensional to non-dimensional composition.
 
int getVelBCType (int dir, Side::LoHiSide side)
 Get the velocity boundary condition.
 
Real calculatePermeability (Real liquidFraction)
 Compute permeability from porosity.
 
void setTime (Real a_time)
 Set the time, might be used for BCs.
 
void writeToHDF5 (HDF5HeaderData &a_header) const
 Write out the key parameters to hdf5 file, so that solution can be reconstructed.
 
string getVelocityScale () const
 Returns a string indicating the velocity scale used for nondimensionalisation.
 
Real computePorosity (Real H, Real C)
 Utility function to compute porosity given a single enthalpy/bulk concentration value.
 
Real compute_dHdT (Real H, Real C)
 
Real computeTemperature (Real H, Real C)
 Utility function to compute temperature given a single enthalpy/bulk concentration value.
 
void computeDiagnosticVars (Real H, Real C, Real T, Real porosity, Real Cl, Real Cs)
 Compute everything from enthalpy and bulk concentration.
 
string getTimescale () const
 Returns a string indicating the time scale used for nondimensionalisation.
 
bool isDarcyBrinkman ()
 Returns whether or not we're solving the Darcy-Brinkman equation.
 
bool isViscous ()
 Returns whether or not the problem we're solving contains viscous terms.
 
void computeDerivedBCs ()
 Compute boundary conditions for fields which can be found from the enthalpy and salinity via the phase diagram.
 

Public Attributes

PhysicalProblems physicalProblem
 Benchmark problem to solve.
 
Real viscosity
 Viscosity, $ \eta $, used in rayleigh number calculations.
 
Real heatConductivityLiquid
 Liquid heat conductivity, $ k_l $.
 
Real heatConductivitySolid
 Solid heat conductivity, $ k_s $.
 
Real specificHeatLiquid
 Specific heat capacity of the liquid phase, $ c_l $.
 
Real specificHeatSolid
 Specific heat capacity of the solid phase, $c_s$.
 
Real liquidDensity
 Density of the liquid.
 
Real latentHeatDissolution
 Latent heat for liquid->solid phase change.
 
Real thermalExpansivity
 Thermal expansivity ( $\mbox{K}^{-1} $)
 
Real solutalExpansivity
 Solutal expansitivity ( $\mbox{(g/kg)}^{-1}$ )
 
Real eutecticTemp
 Temperature at the eutectic point.
 
Real eutecticComposition
 Bulk concentration at the eutectic point.
 
Real initialComposition
 Initial bulk concentration.
 
Real liquidusSlope
 Slope of the linearised liquidus $\mbox{ K (g/kg)}^{-1} $.
 
Real waterDistributionCoeff
 Water distribution coefficient, $ p_c $. More...
 
Real heleShawCoolingCoeff
 Hele-Shaw cooling coefficient - not currently in use.
 
Real liquidSoluteDiffusivity
 Diffusivity of salt in the liquid phase, $ D_l $.
 
Real d
 Hele-Shaw cell width - not currently in use.
 
Real height
 Domain height.
 
Real width
 Domain width - not currently in use.
 
Real referencePermeability
 Reference permeability $ K_0 $.
 
Real gravitationalAcceleration
 Gravitational acceleration, $ g $.
 
Real V
 Frame advection velocity $ V $.
 
Real deltaTemp
 Temperature differenece used for nondimensionalisation. More...
 
Real deltaSalt
 Salt difference used for nondimensionalisation. More...
 
Real stefan
 Stefan number. More...
 
Real compositionRatio
 Composition ratio = $ \frac{S_e (p_c - 1)}{S_i -S_e} $.
 
Real liquidHeatDiffusivity
 Heat diffusivity in the liquid phase.
 
Real heatConductivityRatio
 Thermal conductivity ratio $ \bar{k} = k_s/k_l $.
 
Real specificHeatRatio
 Specific heat ratio $ \bar{c} = c_s/c_l $.
 
Real lewis
 Lewis number $ Le = \kappa_l/D_l $.
 
Real darcy
 Darcy number $ K_0/h^2 $. More...
 
Real nonDimReluctance
 Non dimensional reluctance of the hele-shaw cell. More...
 
Real heleShamPermeability
 Dimensionless Hele-Shaw cell permeability. More...
 
Real reynolds
 Reynolds number $ \rho_0 \kappa_l / \eta $. Not used any more.
 
Real prandtl
 Prandtl number $ \eta / \rho_0 \kappa_l $.
 
Real rayleighTemp
 Rayleigh number for temperature contributions to buoyancy. More...
 
Real rayleighComposition
 Rayleigh number for salinity contributions to buoyancy. More...
 
Real timescale
 Timescale for nondimensionalisation - not currently used. More...
 
int m_nondimensionalisation
 How to nondimensionalise the governing equations.
 
Real m_heatDiffusionCoeff
 Heat diffusion coefficient.
 
Real m_saltDiffusionCoeff
 Salt diffusion coefficient.
 
Real activeTracerDiffusionCoeff
 Active tracer diffusion coefficient.
 
Real passiveTracerDiffusionCoeff
 Passive tracer diffusion coefficient.
 
Real activeTracerInitVal
 Initial value of active tracer.
 
Real passiveTracerInitVal
 Initial value of passive tracer.
 
Real m_viscosityCoeff
 Viscosity.
 
Real m_buoyancyTCoeff
 Buoyancy due to temperature.
 
Real m_buoyancySCoeff
 Buoyancy due to liquid concentration.
 
Real m_darcyCoeff
 Darcy coefficient.
 
Real m_advectionCoeff
 Coefficient for advection terms.
 
Real body_force
 Constant body force, which we add to the buoyancy. More...
 
Real nonDimVel
 Dimensionless frame advection velocity.
 
Real nonDimHeleShawCooling
 Dimensionless hele-shaw cooling coefficient.
 
Real thetaEutectic
 Dimensionless temperature at the eutectic, $ \theta_e $.
 
Real thetaInf
 Dimensionless temperature at infinity, $ \theta_\infty $.
 
Real thetaInitialLiquidus
 Dimensionless initial temperature calculated from liquidus (not currently used)
 
Real thetaInitial
 Dimensionless initial temperature $ \theta_i $.
 
Real thetaInterface
 Dimensionless temperature at mush-liquid interface. More...
 
Real ThetaEutectic
 Dimensionless bulk concentration at the eutectic $ \Theta_e $.
 
Real ThetaInitial
 Dimensionless initial bulk concentration $ \Theta_i $.
 
Real ThetaInf
 Dimensionless far field bulk concentration $ \Theta_\infty $.
 
Real ThetaLInitial
 Dimensionless initial liquid concentration $ \Theta_{l,i} $.
 
Real ThetaSInitial
 Dimensionless initial solid concentration $ \Theta_{s,i} $.
 
Real Hinitial
 Dimensionless initial enthalpy.
 
Real thetaPlumeInflow
 For plumes. More...
 
Real HPlumeInflow
 Enthalpy inflow value in plume.
 
Real ThetaPlumeInflow
 Bulk concentration inflow value in plume.
 
Real ThetaLPlumeInflow
 Liquid concentration inflow value in plume.
 
Real ThetaSPlumeInflow
 Solid concentration inflow value in plume.
 
Real porosityPlume
 Porosity inflow value in plume.
 
Real permeabilityPlume
 Permeability inflow value in plume.
 
Real HLiquidusPlume
 Liquidus inflow value in plume.
 
Real HEutecticPlume
 Eutectic inflow value in plume.
 
Real HSolidusPlume
 Solidus inflow value in plume.
 
Real referenceTemperature
 Reference temperature for nondimensionalisation.
 
Real referenceSalinity
 Reference salinity for nondimensionalisation.
 
Real inflowVelocity
 Inflow velocity, when required.
 
Real pressureHead
 Pressure difference between top and bottom boundaries.
 
Vector< RealplumeBounds
 Specify start and end of an inflow plume.
 
Vector< int > bcTypeVelLo
 Velocity boundary conditions (lo side, for each spatial direction)
 
Vector< int > bcTypeVelHi
 Velocity boundary conditions (hi side, for each spatial direction)
 
Vector< int > bcTypeEnthalpyLo
 Enthalpy boundary conditions (lo side, for each spatial direction)
 
Vector< int > bcTypeEnthalpyHi
 Enthalpy boundary conditions (hi side, for each spatial direction)
 
Vector< int > bcTypeBulkConcentrationLo
 Bulk concentration boundary conditions (lo side, for each spatial direction)
 
Vector< int > bcTypeBulkConcentrationHi
 Bulk concentration boundary conditions (hi side, for each spatial direction)
 
Vector< int > bcTypeTemperatureLo
 Temperature boundary conditions (low side, for each spatial direction)
 
Vector< int > bcTypeTemperatureHi
 Temperature boundary conditions (hi side, for each spatial direction)
 
Vector< int > bcTypeLiquidConcentrationLo
 Liquid concentration boundary conditions (low side, for each spatial direction)
 
Vector< int > bcTypeLiquidConcentrationHi
 Liquid concentration boundary conditions (hi side, for each spatial direction)
 
Vector< int > bcTypePorosityLo
 Porosity boundary conditions (low side, for each spatial direction)
 
Vector< int > bcTypePorosityHi
 Porosity boundary conditions (hi side, for each spatial direction)
 
Vector< int > bcTypePermeabilityLo
 Permeability boundary conditions (low side, for each spatial direction)
 
Vector< int > bcTypePermeabilityHi
 Permeability boundary conditions (hi side, for each spatial direction)
 
Real sinusoidal_temperature_bc_timescale
 
Real sinusoidal_temperature_bc_amplitude
 
Real sinusoidal_temperature_bc_av
 
Real sinusoidal_temperature_bc_phase_diff
 
Vector< int > bcTypeScalarLo
 Unified BCs for all scalars (lo side, for each spatial direction)
 
Vector< int > bcTypeScalarHi
 Unified BCs for all scalars (hi side, for each spatial direction)
 
RealVect bcValEnthalpyHi
 Vector containing boundary values. More...
 
RealVect bcValEnthalpyLo
 Enthalpy BCs on lo-side boundaries.
 
RealVect bcValBulkConcentrationHi
 Bulk Concentration BCs on hi-side boundaries.
 
RealVect bcValBulkConcentrationLo
 Bulk Concentration BCs on lo-side boundaries.
 
RealVect bcValTemperatureHi
 Temperature BCs on hi-side boundaries.
 
RealVect bcValTemperatureLo
 Temperature BCs on lo-side boundaries.
 
RealVect bcValLiquidConcentrationLo
 Liquid concentration BCs on lo-side boundaries.
 
RealVect bcValLiquidConcentrationHi
 Liquid concentration BCs on hi-side boundaries.
 
RealVect bcValPorosityLo
 Porosity BCs on lo-side boundaries.
 
RealVect bcValPorosityHi
 Porosity BCs on hi-side boundaries.
 
RealVect bcValPermeabilityLo
 Permeability BCs on lo-side boundaries.
 
RealVect bcValPermeabilityHi
 Permeability BCs on hi-side boundaries.
 
RealVect bcValVelHi
 Velocity BCs on hi-side boundaries.
 
RealVect bcValVelLo
 Velocity BCs on lo-side boundaries.
 
RealVect bcValSolidusHi
 Solidus BCs on hi-side boundaries.
 
RealVect bcValSolidusLo
 Solidus BCs on lo-side boundaries.
 
RealVect bcValLiquidusHi
 Liquidus BCs on hi-side boundaries.
 
RealVect bcValLiquidusLo
 Liquidus BCs on lo-side boundaries.
 
RealVect bcValEutecticHi
 Eutectic BCs on hi-side boundaries.
 
RealVect bcValEutecticLo
 Eutectic BCs on lo-side boundaries.
 
RealVect bcValSolidConcentrationLo
 Solid concentration BCs on lo-side boundaries.
 
RealVect bcValSolidConcentrationHi
 Solid concentration BCs on hi-side boundaries.
 
RealVect bcValPressureHi
 Pressure BCs on hi/lo sides. More...
 
RealVect bcValPressureLo
 Pressure BC on the low side of the domain in each direction (x, y, z)
 
BCInfo m_bc_noFluxLimit
 Position along each face, below which to enforce no heat flux (above this position, enforce some other specified heat flux)
 
BCInfo m_bc_bTref
 Reference temperature for radiation boundary conditions.
 
BCInfo m_bc_b
 Some generic variable which can be used in various boundary conditions if required.
 
BCInfo m_bc_a
 
int max_bc_iter
 
int bc_nonlinear_solve_method
 
Real max_bc_residual
 
Real bc_relax_coeff
 For nonlinear BCs solve.
 
int m_BCAccuracy
 First or second order BCs.
 
int m_pressureBCAccuracy
 Accuracy for pressure bcs.
 
Real m_time
 Time, in case BCs are time-dependent.
 
int m_timeDependentBC
 To specify which of timeDependentBCtypes we want to use.
 
Real m_BCamplitude
 Amplitude of time periodic boundary conditions.
 
Real m_BCtimescale
 Time scale (period) for time periodic boundary conditions.
 
int fixedTempDirection
 0 means sidewall heating, 1 means vertical heating (sea ice)
 
PermeabilityFunctions permeabilityFunction
 Which permeability function should we use?
 
bool heleShaw
 Are we running the experiment in a Hele-Shaw cell?
 
ParamsPorosityFunctions m_porosityFunction
 For cases where want to impose a porosity, e.g. for benchmarking.
 
ViscosityFunction m_viscosityFunction
 For when we want the fluid viscosity to depend on the solute concentration.
 
Real max_viscosity
 Maximum dimensionless viscosity the fluid can have. More...
 

Static Public Attributes

static string s_DARCY_TIMESCALE = "Darcy"
 Darcy timescale.
 
static string s_DIFFUSIVE_TIMESCALE = "Diffusive"
 Diffusive timescale.
 
static string s_BUOYANCY_TIMESCALE = "Buoyancy"
 Buoyancy timescale.
 
static string s_ADVECTIVE_TIMESCALE = "Advective"
 Advective timescale.
 
static string s_ADVECTIVE_VELOCITY_SCALE = "Advective"
 Advective velocity scale.
 
static string s_DARCY_VELOCITY_SCALE = "Darcy"
 Darcy velocity scale.
 

Detailed Description

Class to handle the physical parameters of a mushy layer simulation.

This includes material properties, boundary conditions, initial conditions and more. Properties are read in and then non-dimensionalised here.

Member Enumeration Documentation

◆ nondimensionalisations

Different options for nondimensionalisation.

Enumerator
m_diffusiveTime_advectiveVel 

Diffusive timescale, advective velocity scale.

m_darcyTime_advectiveVel 

Darcy timescales, advective velocity scale.

m_darcyTime_darcyVel 

Darcy timescale, darcy velocity scale.

m_advectiveTime_darcyVel 

Advective timescale, darcy velocity scale.

m_buoyancyTime_advectiveVel 

Buoyancy timescale, advective velocity scale.

m_num_nondimensionalisations 

Number of nondimensional schemes.

◆ timeDependentBCtypes

Possible time dependences for BCs.

These are implemented in PhysBCUtil::updateTimeDependentBCs() With the parameters for each option contained with this MushyLayerParams object. You can add your own options to the list below, then implement them in PhysBCUtil::updateTimeDependentBCs()

Member Function Documentation

◆ parseBCs()

void MushyLayerParams::parseBCs ( string  a_name,
Vector< int > *  a_bcHolder,
bool  required = false 
)

Read in BCs from the inputs file.

SolidWall, Inflow, Outflow, OutflowNormal, // only a normal velocity VelInflowOutflow, // both inflow and outflow possible noShear, Symmetry, VelInflowPlume, OutflowPressureGrad, PressureHead,

Member Data Documentation

◆ bcValEnthalpyHi

RealVect MushyLayerParams::bcValEnthalpyHi

Vector containing boundary values.

Enthalpy BCs on hi-side boundaries

◆ bcValPressureHi

RealVect MushyLayerParams::bcValPressureHi

Pressure BCs on hi/lo sides.

Note that the type of pressure bc is determine from the type of velocity bc specified, as the two are coupled. The values specified here are only used for enforcing a pressure head

◆ body_force

Real MushyLayerParams::body_force

Constant body force, which we add to the buoyancy.

Buoyancy $ = \chi (Ra_T \theta - Ra_c*\Theta_l) \mathbf{k} + \mathbf{F}_B $

where $ \mathbf{F}_B $ is the buoyancy force

◆ darcy

Real MushyLayerParams::darcy

Darcy number $ K_0/h^2 $.

Set to zero to turn off viscosity.

◆ deltaSalt

Real MushyLayerParams::deltaSalt

Salt difference used for nondimensionalisation.

$ \Delta S = S_e - S_i $

◆ deltaTemp

Real MushyLayerParams::deltaTemp

Temperature differenece used for nondimensionalisation.

$ \Delta T = - \Gamma \Delta S $

◆ heleShamPermeability

Real MushyLayerParams::heleShamPermeability

Dimensionless Hele-Shaw cell permeability.

$ \Pi_H = d^2/(12 K_0)$. Inverse of nonDimReluctance.

◆ max_viscosity

Real MushyLayerParams::max_viscosity

Maximum dimensionless viscosity the fluid can have.

Only used when m_viscosityFunction is not = 0

◆ nonDimReluctance

Real MushyLayerParams::nonDimReluctance

Non dimensional reluctance of the hele-shaw cell.

Inverse of permeability. Equivalent to the Darcy number if Katz & Worster (2008) Reluctance = 12 K_0/d^2 = Da * 12 * (h/d)^2

◆ rayleighComposition

Real MushyLayerParams::rayleighComposition

Rayleigh number for salinity contributions to buoyancy.

\[ Ra_T = \frac{\rho_0 g h K_0 \beta (S_i - S_e)}{\kappa_l \eta} \]

◆ rayleighTemp

Real MushyLayerParams::rayleighTemp

Rayleigh number for temperature contributions to buoyancy.

\[ Ra_T = \frac{\rho_0 g h K_0 \alpha (T_i - T_e)}{\kappa_l \eta} \]

◆ stefan

Real MushyLayerParams::stefan

Stefan number.

\[ = \frac{L}{c_{p,l} (T_i - T_e)} \]

◆ thetaInterface

Real MushyLayerParams::thetaInterface

Dimensionless temperature at mush-liquid interface.

Used particularly for solidification without flow benchmark problem

◆ thetaPlumeInflow

Real MushyLayerParams::thetaPlumeInflow

For plumes.

Temperature inflow value in plume

◆ timescale

Real MushyLayerParams::timescale

Timescale for nondimensionalisation - not currently used.

$ \tau = h^2 / \kappa_l $

◆ waterDistributionCoeff

Real MushyLayerParams::waterDistributionCoeff

Water distribution coefficient, $ p_c $.

ratio of solid to liquid concentration, $ S_s/S_l $.


The documentation for this class was generated from the following files: