Mushy Layer
1.0
|
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 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, , used in rayleigh number calculations. | |
Real | heatConductivityLiquid |
Liquid heat conductivity, . | |
Real | heatConductivitySolid |
Solid heat conductivity, . | |
Real | specificHeatLiquid |
Specific heat capacity of the liquid phase, . | |
Real | specificHeatSolid |
Specific heat capacity of the solid phase, . | |
Real | liquidDensity |
Density of the liquid. | |
Real | latentHeatDissolution |
Latent heat for liquid->solid phase change. | |
Real | thermalExpansivity |
Thermal expansivity ( ) | |
Real | solutalExpansivity |
Solutal expansitivity ( ) | |
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 . | |
Real | waterDistributionCoeff |
Water distribution coefficient, . More... | |
Real | heleShawCoolingCoeff |
Hele-Shaw cooling coefficient - not currently in use. | |
Real | liquidSoluteDiffusivity |
Diffusivity of salt in the liquid phase, . | |
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 . | |
Real | gravitationalAcceleration |
Gravitational acceleration, . | |
Real | V |
Frame advection velocity . | |
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 = . | |
Real | liquidHeatDiffusivity |
Heat diffusivity in the liquid phase. | |
Real | heatConductivityRatio |
Thermal conductivity ratio . | |
Real | specificHeatRatio |
Specific heat ratio . | |
Real | lewis |
Lewis number . | |
Real | darcy |
Darcy number . More... | |
Real | nonDimReluctance |
Non dimensional reluctance of the hele-shaw cell. More... | |
Real | heleShamPermeability |
Dimensionless Hele-Shaw cell permeability. More... | |
Real | reynolds |
Reynolds number . Not used any more. | |
Real | prandtl |
Prandtl number . | |
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, . | |
Real | thetaInf |
Dimensionless temperature at infinity, . | |
Real | thetaInitialLiquidus |
Dimensionless initial temperature calculated from liquidus (not currently used) | |
Real | thetaInitial |
Dimensionless initial temperature . | |
Real | thetaInterface |
Dimensionless temperature at mush-liquid interface. More... | |
Real | ThetaEutectic |
Dimensionless bulk concentration at the eutectic . | |
Real | ThetaInitial |
Dimensionless initial bulk concentration . | |
Real | ThetaInf |
Dimensionless far field bulk concentration . | |
Real | ThetaLInitial |
Dimensionless initial liquid concentration . | |
Real | ThetaSInitial |
Dimensionless initial solid concentration . | |
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< Real > | plumeBounds |
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. | |
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.
Different options for nondimensionalisation.
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()
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,
RealVect MushyLayerParams::bcValEnthalpyHi |
Vector containing boundary values.
Enthalpy BCs on hi-side boundaries
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
Real MushyLayerParams::body_force |
Constant body force, which we add to the buoyancy.
Buoyancy
where is the buoyancy force
Real MushyLayerParams::darcy |
Darcy number .
Set to zero to turn off viscosity.
Real MushyLayerParams::deltaSalt |
Salt difference used for nondimensionalisation.
Real MushyLayerParams::deltaTemp |
Temperature differenece used for nondimensionalisation.
Real MushyLayerParams::heleShamPermeability |
Dimensionless Hele-Shaw cell permeability.
. Inverse of nonDimReluctance.
Real MushyLayerParams::max_viscosity |
Maximum dimensionless viscosity the fluid can have.
Only used when m_viscosityFunction is not = 0
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
Real MushyLayerParams::rayleighComposition |
Rayleigh number for salinity contributions to buoyancy.
Real MushyLayerParams::rayleighTemp |
Rayleigh number for temperature contributions to buoyancy.
Real MushyLayerParams::stefan |
Stefan number.
Real MushyLayerParams::thetaInterface |
Dimensionless temperature at mush-liquid interface.
Used particularly for solidification without flow benchmark problem
Real MushyLayerParams::thetaPlumeInflow |
For plumes.
Temperature inflow value in plume
Real MushyLayerParams::timescale |
Timescale for nondimensionalisation - not currently used.
Real MushyLayerParams::waterDistributionCoeff |
Water distribution coefficient, .
ratio of solid to liquid concentration, .