Mushy Layer  1.0
Public Attributes | List of all members
MushyLayerOptions Struct Reference

Contains most of the options for running the code, and how to handle the equations. More...

#include <mushyLayerOpt.h>

Public Attributes

string output_dir
 Output directory for plot and checkpoint files.
 
string plotfile_prefix
 Prefix for plot files.
 
bool minimalOutput
 Turn on to only produce a minimal ammount of output.
 
bool debug
 Turn on to produce lots of output.
 
Real steadyStateCondition
 Maximum value by which the solution may have changed for us to have reached steady state.
 
bool ignoreVelocitySteadyState
 Turn on to ignore changes in velocity when deciding if we've reached steady state.
 
bool ignoreBulkConcSteadyState
 Turn on to ignore changes in bulk concentration when deciding if we've reached steady state.
 
Real domainWidth
 Domain width.
 
Real domainHeight
 Domain height.
 
Real cfl
 Maximum allowed CFL number.
 
bool skipUnsafeCFL
 TODO: remove this.
 
bool forceUseUChiForCFL
 Force the code to compute a CFL condition based on the size of $\mathbf{U}/\chi$, rather than $ \mathbf{U} $.
 
Real min_time
 Minimum time to run simulations for (even if the steady state condition has been met)
 
Real max_dt_growth
 Maximum allowed fractional increase in dt from one timestep to the next.
 
Real init_dt_scale
 Multiply the dt computed during initialisation procedures by this factor before using it. More...
 
Real fixedDt
 Enforce a fixed timestep (if > 0)
 
Real initial_dt_multiplier
 Scale initial dt's by this factor.
 
Real minDt
 Minimum dt allowed.
 
Real max_dt
 Maximum dt allowed.
 
Real max_init_dt
 Maximum initial dt allowed.
 
Real accelCFL
 CFL number for acceleration. Only used if useAccelDt = true. More...
 
bool printAccelDt
 Turn on to print some diagnostics about the dt computed according to acceleration considerations.
 
bool useAccelDt
 Use the timesteps computed according to the cfl condition applied to accelerations.
 
bool useInitAccelDt
 For the first timestep, use dt computed according to the cfl condition applied to accelerations.
 
int max_possible_level
 Maximum level allowed in this AMR hierarchy.
 
bool computeVorticityStreamFunction
 Turn on to compute the vorticity/streamfunction as a diagnostic.
 
bool useFortranRegularisationFace
 Turn on to use fortran routines for regularising the solution on cell faces (i.e. ensuring porosity is not 0) More...
 
bool useFortranRegularisation
 Turn on using fortran routines for regularising the solution on cell centres (i.e. ensuring porosity is not 0)
 
bool viscousBCs
 Whether or not we want to use viscous boundary conditions.
 
int num_init_passes
 Number of loops of the pressure initialisation routine.
 
Real restart_new_time
 If >= 0, and we're restarting, set the simulation time to this.
 
bool init_use_prev_pressure_for_Ustar
 Whether to use previous estimates of the pressure to compute the initial cell centred $ \mathbf{U}^* $. More...
 
bool init_compute_uDelu
 Whether to compute $ \mathbf{U} \cdot \nabla \mathbf{U}/\chi $ terms during initialisation. More...
 
Real spongeHeight
 Distance from the bottom of the domain that a sponge region will extend.
 
bool skipSaltUpdate
 Turn on to set the advective source term in the salt equation to 0.
 
bool skipHCUpdate
 Turn on to stop evolving the enthalpy and bulk concentration fields.
 
bool doDiffusionSrc
 Use a diffusive source term to compute the advective terms more accurately. More...
 
Real rampBuoyancy
 Fractional increase in the buoyancy force with each timestep.
 
Real initRaC
 Initial RaC when we're changing the buoyancy force at each timestep.
 
Real initRaT
 Initial RaT when we're changing the buoyancy force at each timestep.
 
Real maxRaC
 Max RaC when we're changing the buoyancy force at each timestep.
 
Real maxRaT
 Max RaT when we're changing the buoyancy force at each timestep.
 
Real initAdvVelCentering
 At which time to compute advection velocities during initialisation. More...
 
Real adv_vel_centering_growth
 
bool ignoreSolveFails
 Whether or not we want to ignore solvers failing. More...
 
int solverFailRestartMethod
 What to do if a solver fails and we're not ignoring the problem.
 
int steadyStateNormType
 When testing for steady state can consider different norms of the solution. More...
 
bool load_advVel
 Whether we want to try and load the advection velocity from a restart file. More...
 
int CFinterpOrder_advection
 Whether to do 1st order (set to 1) or 2nd order (set to 2) interpolation at coarse-fine boundaries.
 
bool nonlinearHCOpSuperOptimised
 Whether we want to try and do some dodgy stuff to make the enthalpy-bulk concentration nonlinear solver quicker. More...
 
bool apply_diagnostic_bcs
 Whether to apply BCs to temperature, porosity etc. explicitly during multigrid solves. More...
 
bool useSubcycling
 Whether or not to do subcycling.
 
int verbosity
 How much text output to produce on a scale of 0 -> infinity.
 
bool useLimiting
 Use slope limiting in advection calculations?
 
int tagBufferSize
 Number of cells to add around tagged cells before computing new meshes.
 
Real refineThresh
 Refinement threshold.
 
bool doEulerPart
 
bool computeDiagnostics
 Whether or not to compute diagnostics ad hoc.
 
bool doProjection
 Whether or not to do projection.
 
bool useIncrementalPressure
 Whether or not to use the previous pressure when solving Darcy's equation. More...
 
bool useIncrementalPressureRefinedLevels
 Whether or not to solve for an incremental pressure change on fine levels, rather than the full pressure. More...
 
bool doSyncOperations
 Whether or not to do synchronisation operations over multiple levels have reached the same time.
 
bool enforceAnalyticSoln
 Whether or not to enforce an analytic solution at the start of the simulation.
 
int analyticSolution
 Define the analytic solution to apply. More...
 
Real maxDivUFace
 Try and make sure the maximum divergence of the face centred velocity is less than this.
 
bool scaleP_MAC
 Whether or not the MAC (face-centred) projection should solve for a pressure that is scaled by the porosity or permeability. More...
 
bool scaleP_CC
 Whether or not the CC (cell-centred) projection should solve for a pressure that is scaled by the porosity. More...
 
bool usePiAdvectionBCs
 Use the cell centred pressure $ \pi $ as the boundary condition when solving for the face centred pressure $ \phi $. More...
 
int projection_verbosity
 How much output the projection object should generate.
 
bool multiCompUStarSolve
 Solve for all velocity componenents at once. Not currently implemented.
 
Real solidPorosity
 Porosity below which we enforce zero velocity. More...
 
Real advPorosityLimit
 Porosity below which we ensure advection velocities are 0.
 
Real chiLimit
 If > 0, use Darcy's equation to compute velocities in cells with porosity less than this value.
 
Real ccVelPorosityLimit
 Porosity below which we ensure cell-centred velocities are 0.
 
Real advVelsrcChiLimit
 Porosity below which we ensure that the src term for computing advection velocities is 0.
 
Real uDelU_porosityLimit
 Porosity below which we ensure that the $ \mathbf{U} \cdot \nabla \mathbf{U} $ part of the cell-centred source term is 0.
 
Real advVelChiLimit
 Porosity below which we ensure that velocities are zero when computing $ \mathbf{U} \cdot \nabla \mathbf{U} $.
 
bool useOldAdvVel
 Use advection velocity from previous timestep for tracing advection velocities. More...
 
bool enforceAnalyticVel
 Whether to enforce an analytic velocity field.
 
bool projectAnalyticVel
 Whether to project the enforced analytic velocity field. More...
 
int analyticVelType
 If enforcing an analytic velocity, decide what to use.
 
bool initAnalyticVel
 Whether or not to initialise the velocity to an analytically specified value.
 
int maxProjBaseLevel
 Maximum number of projections to do on levle 0.
 
int maxNumMACProj
 Maximum number of MAC (face cented) projections to do.
 
int lapVelBCOrder
 Accuracy for boundary conditions applied to laplacian(velocity) in the advection velocity source term.
 
Real CCVelSrcTermCentering
 Where to compute the CC velocity source term (default = 0.5 i.e. halfway through the timestep)
 
int uDeluMethod
 
int uDelU_grow
 
bool uDelUConservativeForm
 
bool advVelPressureSrc
 Whether or not to include pressure in the advection velocity source term.
 
bool advVelDarcySrc
 Whether or not to include the Darcy term in the advection velocity source.
 
bool advVelViscousSrc
 Whether or not to include the viscous term in the advection velocity source.
 
bool advVelBuoyancySrc
 Whether or not to include buoyancy in the advection velocity source term.
 
bool CCAdvSrc
 Whether or not to include $ \mathbf{U} \cdot \nabla \mathbf{U}/\chi $ in the cell centred velocity source term.
 
bool CCBuoyancySrc
 Whether or not to include buoyancy in the cell centred velocity source term.
 
bool CCPressureSrc
 Whether or not to include pressure in the cell centred velocity source term. More...
 
bool CCPressureSrcOverride
 Turn to make sure we use MushyLayerOptions::CCPressureSrc to decide whether or not to include pressure. More...
 
bool reflux_momentum
 Whether or not to reflux momentum.
 
bool reflux_normal_momentum
 Whether or not to just reflux momentum in the normal direction.
 
bool reflux_enthalpy
 Whether or not to reflux the enthalpy field.
 
bool reflux_concentration
 Whether or not to reflux the bulk concentration field.
 
bool reflux_lambda
 Whether or not to reflux lambda. More...
 
bool refluxAverageDown
 Whether or not to average down from fine levels to coarser levels after refluxing. More...
 
RefluxMethod refluxMethod
 Method to use for implicit refluxing.
 
Real refluxBetaSign
 Coefficient of the laplacian operator during implicit reflux solves. More...
 
Real refluxCorrSign
 Whether to add (+1) or subtract (-1) the correction. More...
 
Real viscous_solver_tol
 Solver tolerance for the viscous solver, which we use for smoothing scalar fields and doing momentum reflux.
 
int viscous_num_smooth_down
 Viscous solver - number of smoothing steps during a down sweep.
 
int viscous_num_smooth_up
 Viscous solver - number of smoothing steps during an up sweep.
 
int AMRMultigridVerb
 Verbosity for the enthalpy-bulk concentration reflux solver.
 
Real AMRMultigridTolerance
 Solver tolerance.
 
Real AMRMultigridHang
 Solver hang condition.
 
Real AMRMultigridNormThresh
 If residual norm is less than this absolute value, solver decides we've converged.
 
int velMGNumSmooth
 Multigrid for implicit cell centred $ \mathbf{U}^* $ solve - num smoothing steps.
 
Real velMGTolerance
 Solver tolerance.
 
Real velMGHang
 Solver tolerance.
 
int velMGNumMG
 Number of V-cycles to perform.
 
Real velMGNormThresh
 Residual norm condition for convergence.
 
int VelMGMaxIter
 Max number of multigrid iterations.
 
int HCMultigridNumSmoothUp
 Multigrid for the coupled enthalpy-bulk concentration solve: number of smooths on each up sweep.
 
int HCMultigridNumSmoothDown
 Number of smooths on each down sweep.
 
int HCMultigridNumMG
 Number of V-cycles to do.
 
int HCMultigridMaxIter
 Max number of multigrid iterations.
 
int HCMultigridVerbosity
 How much output to print.
 
int HCMultigridBottomSolveIterations
 Number of iterations of the bottom solver.
 
Real HCMultigridTolerance
 Solver tolerance.
 
Real HCMultigridHang
 Hang condition.
 
Real HCMultigridNormThresh
 Condition on the norm of the residual for convergence.
 
int HCMultigridRelaxMode
 How to do relaxation. More...
 
bool HCMultigridUseRelaxBottomSolverForHC
 Whether to use a relaxation scheme as the bottom solve. More...
 
int velAdvNormalPredOrder
 Order of the normal predictor for velocity advection solves.
 
bool velAdvUseFourthOrderSlopes
 Whether to use 4th order slopes for velocity advection solves.
 
bool velAdvHigherOrderLimiter
 Whether to use a higher order flux limiter for velocity advection solves.
 
bool velAdvUseArtVisc
 Whether to use artifical viscosity for velocity advection solves.
 
Real velAdvArtVisc
 Value of artifical viscosity to use for velocity advection solves. More...
 
bool HCUseArtVisc
 Whether to use artificial viscosity for enthalpy-bulk concentration advection.
 
Real HCArtVisc
 Value of artificial viscosity to use for enthalpy-bulk concentration advection.
 
int HCNormalPredOrder
 Order of the normal predictor for enthalpy-bulk concentration advection.
 
bool HCUseFourthOrderSlopes
 Whether to use 4th order slopes for enthalpy-bulk concentration advection.
 
bool HCHigherOrderLimiter
 Whether to use a higher order flux limiter for enthalpy-bulk concentration advection.
 
int taggingVar
 Scalar variable to use for working out where to do refinement.
 
int taggingVectorVar
 Vector variable to use for working out where to do refinement.
 
TaggingMethod taggingMethod
 Strategy for tagging cells. See TaggingMethod for the options.
 
Real min_regrid_time
 Don't start regridding until time > min_regrid_time.
 
Real fixed_grid_time
 If this is > 0, then when time > fixed_grid_time we will switch to the grid specified by 'main.regrid_gridfile'.
 
bool tagDomainBoundary
 Whether we should tag the domain boundary for refinement.
 
bool tagMLboundary
 Whether we should tag the mush-liquid boundary for refinement.
 
RefinementMethod refinementMethod
 Method for refinement.
 
bool onlyTagPorousCells
 Turn on to only tags cells where other refinement criteria are met and porosity $\chi < 1 $.
 
int porousCellsShrink
 Filter porous cells to remove anomalies. More...
 
bool tag_velocity
 Whether we should tag cells where the fluid velocity (magnitude) is greater than MushyLayerOptions::vel_thresh.
 
bool compositeChannelTagging
 New option for a refinement method based on a composite criteria.
 
Real vel_thresh
 If MushyLayerOptions::tag_velocity is true, specify the velocity magnitude criteria here.
 
bool tag_plume_mush
 Refine mushy regions on level 1, the refine around plumes according to some empirical criteria. More...
 
bool tag_channels
 Just refine around channels.
 
Real plumeVelThreshold
 Velocity theshold value for identifying plumes.
 
Real plumeSalinityThreshold
 Salinity threshold value for identifying plumes.
 
Real taggingMarginalPorosityLimit
 If less than 1, use this limit to identify cells with taggingMarginalPorosityLimit < porosity < 1.0. More...
 
int tagCenterBoxSize
 Tag cells in the centre of the domain to make a box of this size. Leave as 0 (default) to do nothing.
 
Real tagCenterBoxRegridTime
 If MushyLayerOptions::tagCenterBoxSize > 0, then regrid once time > tagCenterBoxRegridTime.
 
bool testRegridCoarsening
 For testing: if turned on, refined levels will only exist for one regrid cycle before being removed. More...
 
bool scalarHOinterp
 Whether to do higher order interpolationg for scalars to fill new cells following regridding.
 
bool vectorHOinterp
 Whether to do higher order interpolation for vectors to fill new cells following regridding.
 
bool makeRegridPlots
 Whether or not to produce lots of plot files during regridding. More...
 
Real regrid_dt_scale
 Factor by which to scale dt for re-initialising pressure following regridding.
 
bool initLambdaPostRegrid
 Whether or not to recalculate lambda after regridding.
 
bool regrid_advect_before_freestream
 Whether or not to advect lambda after regridding, in order to recompute the freestream correction.
 
bool regrid_freestream_subcycle
 Whether or not to do subcycling when advecting lambda after regridding. More...
 
Real regrid_eta_scale
 Option to scale $ \eta $ before recomputing the freestream correction after regridding. More...
 
bool do_postRegrid_smoothing
 Whether or not to do some smoothing after regridding.
 
Real regrid_smoothing_coeff
 Coefficient to determine how aggressively to do smoothing (if MushyLayerOptions::do_postRegrid_smoothing = true)
 
bool project_initial_vel
 Whether or not to project the initial velocity field. More...
 
bool initialize_pressures
 Whether or not to initialize pressures.
 
bool regrid_init_pressure
 Whether or not to initialize pressure after regridding.
 
bool regrid_linear_interp
 Whether to do bi-linear interpolation when regridding.
 
bool usePrevPressureForUStar
 Set the initial value for AMRLevelMushyLayer::m_usePrevPressureForUStar. More...
 
Real diagnostics_period
 Time period between successive diagnostic reports.
 
int customInitData
 Some custom options for initial data.
 
bool writePressureInitFields
 Whether to write out plotfiles during pressure initialisation. More...
 
bool initResetStates
 When initialising pressure via multiple iterations, decide whether or not to reset the other fields between iterations.
 
bool allowMulticompAdvection
 Advect both enthalpy and bulk concentration at the same time (slightly more efficient)
 
bool compute_initial_VD_corr
 Whether or not to compute the volume discrepancy correction at the start of a simulation.
 
int timeIntegrationOrder
 Order of accuracy for time integration (1 = backward euler, 2 = TGA)
 
Real lowerPorosityLimit
 How much output multigrid operators should print. More...
 
Real initialPerturbation
 Size of the initial perturbation (default = 0.0)
 
bool doScalarAdvectionDiffusion
 Whether or not we should do advection and diffusion of scalars (enthalpy, bulk concentration)
 
Real initVel
 Size of initial velocity if required.
 
Real perturbationPhaseShift
 Phase shift for sinusoidal perturbations.
 
Real delayedPerturbation = 0.0
 Size of perturbation to add at time MushyLayerOptions::perturbationTime.
 
Real perturbationTime = 0.0
 Specific time at which to introduce a perturbation.
 
Real perturbationWavenumber
 Wavenumber of sinusoidal perturbations (default = 0.0, i.e. just a uniform value)
 
bool perturbationSin = false
 If true, sinusoidal perturbations take the form of a sin wave. Otherwise a cosine wave. More...
 
Real initialRandomPerturbation = 0.0
 Add an initial random perturbation to enthalpy.
 
bool seedRandomPert = true
 
Real fixedPorosity = -1.0
 Porosity value to set if we're using a fixed porosity. More...
 
Real porosityTimescale
 Timescale for porosity variations if enforcing a fixed porosity.
 
PorosityFunctions porosityFunction
 Functional form to use for the porosity if using a fixed porosity (rather than a porosity computed from the solution).
 
int maxRestartWavenumbers
 When restarting, if MushyLayerOptions::restartPerturbation > 0.0 then add a perturbation which if the sum of waves with wavenumbers from 1->maxRestartWavenumber.
 
Real restartPerturbation
 Size of perturbation to add when restarting a simulation.
 
Real porousHoleRadius
 Create a porous hole of this radius during initialisation.
 
Real initVelScale
 Velocity scale for the initial conditions.
 
bool linearGradient
 Whether to initialise with a linear enthalpy gradient in the vertical direction.
 
Real mushHeight
 Approximate depth of mushy layer to create as part of an initial condition approximating some sea ice.
 
int summerProfile
 Different options for initialising data that looks a bit like year old sea ice. More...
 
Real meltPondDepth
 Depth of melt pond to add.
 
bool horizAverageRestart
 Whether or not to horizontally average all fields before restarting.
 
int restart_perturbation_var
 When restarting, add a perturbation to this variable.
 
Real refTemp
 Reference temperature for nondimensionalisation.
 
Real refSalinity
 Reference salinity for nondimensionalisation.
 
Real prevRefSalinity
 Previous reference salinity for nondimensionalisation (if restarting and different from the new value)
 
Real prevRefTemp
 Previous reference temperature for nondimensionalisation (if restarting and different from the new value)
 
Real dtReductionFactor
 Facotr by which to reduce dt after restarting: $ dt = dt / dtReductionFactor $.
 
Real fixedPorosityMaxChi
 Fixed porosity maximum value.
 
Real FixedPorositySTD
 Standard deviation of the gaussian used to create a fixed porosity field.
 
Real fixedPorosityFractionalInnerRadius
 For a fixed porosity which varies linearly from some constant value inside the domain to the edge, this is the radius of the inner region.
 
Real fixedPorosityEndTime
 If using a time dependent enforced porosity, stop changing it after this time has passed.
 
bool scalarExchangeCorners
 Whether to exchange corner cells by default for scalar fields.
 
Real buoyancy_zero_time
 Set buoyancy forces to zero after this time.
 
MGmethod MGtype
 If this is set to greater than 0,. More...
 
velocityAdvectionTypes advectionMethod
 Specify how to treat the $ \mathbf{U} \cdot \nabla \left( \mathbf{U}/\chi \right) $ term.
 
bool includeTracers
 Whether to include tracer dynamics.
 
Real surfaceIrradiance
 If > 0, compute penetration of irradiance down through the ice.
 

Detailed Description

Contains most of the options for running the code, and how to handle the equations.

Member Data Documentation

◆ accelCFL

Real MushyLayerOptions::accelCFL

CFL number for acceleration. Only used if useAccelDt = true.

When velocities are changing rapidly due to a large acceleration, the timestep computed based on the current velocities may not be a appropriate. Instead, we should estimate the new velocities given the acceleration:

$ \Delta t = \sqrt{\sigma \Delta x / a} $,

where $ \sigma $ is the cfl number and $ a$ is the maximum acceleration.

◆ adv_vel_centering_growth

Real MushyLayerOptions::adv_vel_centering_growth

When computing the advection velocity during multiple initialisation steps, grow MushyLayerOptions::initAdvVelCentering by this factor with each iteration

◆ analyticSolution

int MushyLayerOptions::analyticSolution

Define the analytic solution to apply.

By default, analyticSolution = MushyLayerParams::physicalProblem

◆ apply_diagnostic_bcs

bool MushyLayerOptions::apply_diagnostic_bcs

Whether to apply BCs to temperature, porosity etc. explicitly during multigrid solves.

If false, use BC comptued from enthalpy/bulk concentration

◆ CCPressureSrc

bool MushyLayerOptions::CCPressureSrc

Whether or not to include pressure in the cell centred velocity source term.

Only matters if MushylayerOptions::CCPressureSrcOverride is turned on

◆ CCPressureSrcOverride

bool MushyLayerOptions::CCPressureSrcOverride

Turn to make sure we use MushyLayerOptions::CCPressureSrc to decide whether or not to include pressure.

Otherwise, we will use AMRLevelMushyLayer::m_usePrevPressureForUStar. This is turned on by default if MushyLayerOptions::CCPressureSrc is defined through the inputs file

◆ doDiffusionSrc

bool MushyLayerOptions::doDiffusionSrc

Use a diffusive source term to compute the advective terms more accurately.

When computing things like $ \mathbf{U} \cdot \nabla T $, we upwind temperature to cell faces. As the temperature also obeys diffuses, we can add a diffusive source term to estimate the upwinded temperatures more accurately. Similarly for other advected and diffused quantities.

◆ fixedPorosity

Real MushyLayerOptions::fixedPorosity = -1.0

Porosity value to set if we're using a fixed porosity.

If < 0, use some functional form for the porosity as defined by MushyLayerOptions::porosityFunction

◆ HCMultigridRelaxMode

int MushyLayerOptions::HCMultigridRelaxMode

How to do relaxation.

See AMRPoissonOp::relax in Chombo for the various options. In particular, 1 = Gauss-Seidel Red-Black, 4 = Jacobi

◆ HCMultigridUseRelaxBottomSolverForHC

bool MushyLayerOptions::HCMultigridUseRelaxBottomSolverForHC

Whether to use a relaxation scheme as the bottom solve.

We use this here as it treats the nonlinearity more sensibly than linear solvers like BiCGStab

◆ ignoreSolveFails

bool MushyLayerOptions::ignoreSolveFails

Whether or not we want to ignore solvers failing.

If false, we'll try and do some thing about the situation as dictated by MushyLayerOptions::solverFailRestartMethod

◆ init_compute_uDelu

bool MushyLayerOptions::init_compute_uDelu

Whether to compute $ \mathbf{U} \cdot \nabla \mathbf{U}/\chi $ terms during initialisation.

Turned on by default

◆ init_dt_scale

Real MushyLayerOptions::init_dt_scale

Multiply the dt computed during initialisation procedures by this factor before using it.

Useful for using a smaller dt initially for stability TODO: can probably remove this, it's just a duplicate of initial_dt_multiplier really

◆ init_use_prev_pressure_for_Ustar

bool MushyLayerOptions::init_use_prev_pressure_for_Ustar

Whether to use previous estimates of the pressure to compute the initial cell centred $ \mathbf{U}^* $.

Turned off by default

◆ initAdvVelCentering

Real MushyLayerOptions::initAdvVelCentering

At which time to compute advection velocities during initialisation.

Default is 0.1, i.e. at time 0 + 0.1*dt

◆ load_advVel

bool MushyLayerOptions::load_advVel

Whether we want to try and load the advection velocity from a restart file.

Turned off by default, as this won't always work with some of the restart files we generate (e.g. after refinement/adding new cells). This is only really useful for when we want to do post processing without recomputing velocity fields.

◆ lowerPorosityLimit

Real MushyLayerOptions::lowerPorosityLimit

How much output multigrid operators should print.

We don't let the porosity go below this value

◆ makeRegridPlots

bool MushyLayerOptions::makeRegridPlots

Whether or not to produce lots of plot files during regridding.

Useful for debugging

◆ MGtype

MGmethod MushyLayerOptions::MGtype

If this is set to greater than 0,.

Whether to use linear or FAS geometric multigrid Should really be FAS as we're solving nonlinear problems, but leaving the option here to change back to linear multigrid.

◆ nonlinearHCOpSuperOptimised

bool MushyLayerOptions::nonlinearHCOpSuperOptimised

Whether we want to try and do some dodgy stuff to make the enthalpy-bulk concentration nonlinear solver quicker.

Turned off by default, use with extreme caution.

◆ perturbationSin

bool MushyLayerOptions::perturbationSin = false

If true, sinusoidal perturbations take the form of a sin wave. Otherwise a cosine wave.

E.g, perturbation $ = \alpha \sin (2 \pi N x / L) $ where $\alpha$ is MushyLayerOptions::initialPerturbation, $ N $ is MushyLayerOptions::perturbationWavenumber, and $ L $ is the domain width

◆ porousCellsShrink

int MushyLayerOptions::porousCellsShrink

Filter porous cells to remove anomalies.

Select all cells with $\chi < 1$, then shift vertically by this value and tag only the intersection of the two

◆ project_initial_vel

bool MushyLayerOptions::project_initial_vel

Whether or not to project the initial velocity field.

Projecting ensures it is divergence free

◆ projectAnalyticVel

bool MushyLayerOptions::projectAnalyticVel

Whether to project the enforced analytic velocity field.

Useful for testing if the projection works as expected

◆ reflux_lambda

bool MushyLayerOptions::reflux_lambda

Whether or not to reflux lambda.

If you don't do this, you won't be able to calculate the freestream preservation correction.

◆ refluxAverageDown

bool MushyLayerOptions::refluxAverageDown

Whether or not to average down from fine levels to coarser levels after refluxing.

As the solution will have changed following refluxing, doing this ensures consistency between levels

◆ refluxBetaSign

Real MushyLayerOptions::refluxBetaSign

Coefficient of the laplacian operator during implicit reflux solves.

This might have to change depending on the operator being used, so left as an option.

◆ refluxCorrSign

Real MushyLayerOptions::refluxCorrSign

Whether to add (+1) or subtract (-1) the correction.

This might need to be changed depending on the operator being used, so left as an option.

◆ regrid_eta_scale

Real MushyLayerOptions::regrid_eta_scale

Option to scale $ \eta $ before recomputing the freestream correction after regridding.

Default value = 1.0.

◆ regrid_freestream_subcycle

bool MushyLayerOptions::regrid_freestream_subcycle

Whether or not to do subcycling when advecting lambda after regridding.

Only used if MushyLayerOptions::regrid_advect_before_freestream is true

◆ scaleP_CC

bool MushyLayerOptions::scaleP_CC

Whether or not the CC (cell-centred) projection should solve for a pressure that is scaled by the porosity.

If scaled, we solve something like $ \nabla \cdot \chi \nabla \pi = \nabla \cdot \mathbf{U}^* $, else we'll solve $ \nabla^2 \pi = \nabla \cdot \mathbf{U}^* $.

◆ scaleP_MAC

bool MushyLayerOptions::scaleP_MAC

Whether or not the MAC (face-centred) projection should solve for a pressure that is scaled by the porosity or permeability.

If scaled, we solve something like $ \nabla \cdot \chi \nabla \phi = \nabla \cdot \mathbf{U}^* $, else we'll solve $ \nabla^2 \phi = \nabla \cdot \mathbf{U}^* $.

◆ seedRandomPert

bool MushyLayerOptions::seedRandomPert = true

Turn on to seed random perturbations on different boxes to prevent the same 'random' number patterns in each box

◆ solidPorosity

Real MushyLayerOptions::solidPorosity

Porosity below which we enforce zero velocity.

This needs to be greater than 0

◆ steadyStateNormType

int MushyLayerOptions::steadyStateNormType

When testing for steady state can consider different norms of the solution.

0 -> compute the max value 1 -> compute the L1 norm of the solution (i.e. some of absolute values) 2 -> compute the L2 norm of the solution (i.e. some of values squared)

◆ summerProfile

int MushyLayerOptions::summerProfile

Different options for initialising data that looks a bit like year old sea ice.

See AMRLevelMushyLayer::initialDataMushyLayer() for more details

◆ tag_plume_mush

bool MushyLayerOptions::tag_plume_mush

Refine mushy regions on level 1, the refine around plumes according to some empirical criteria.

Specifically, identify plumes as regions where either a) the downwards velocity is greater than MushyLayerOptions::plumeVelThreshold, and b) the bulk concentration is greater than MushyLayerOptions::plumeSalinityThreshold

◆ taggingMarginalPorosityLimit

Real MushyLayerOptions::taggingMarginalPorosityLimit

If less than 1, use this limit to identify cells with taggingMarginalPorosityLimit < porosity < 1.0.

These cells are then not considered part of the mushy layer for tagging purposes, but also not liquid.

◆ testRegridCoarsening

bool MushyLayerOptions::testRegridCoarsening

For testing: if turned on, refined levels will only exist for one regrid cycle before being removed.

This let's us test levels being created then destroyed in a controlled manner

◆ useFortranRegularisationFace

bool MushyLayerOptions::useFortranRegularisationFace

Turn on to use fortran routines for regularising the solution on cell faces (i.e. ensuring porosity is not 0)

Turned off by default as doesn't work yet.

◆ useIncrementalPressure

bool MushyLayerOptions::useIncrementalPressure

Whether or not to use the previous pressure when solving Darcy's equation.

If true, we then only solve for a small extra pressure correction which is usually a lot quicker

◆ useIncrementalPressureRefinedLevels

bool MushyLayerOptions::useIncrementalPressureRefinedLevels

Whether or not to solve for an incremental pressure change on fine levels, rather than the full pressure.

This may not work fully yet...

◆ useOldAdvVel

bool MushyLayerOptions::useOldAdvVel

Use advection velocity from previous timestep for tracing advection velocities.

Default is false, in which case we average the cell centred velocities from the previous timestep to cell faces and use these (as they are calculated at a later time, they should be more accurate).

◆ usePiAdvectionBCs

bool MushyLayerOptions::usePiAdvectionBCs

Use the cell centred pressure $ \pi $ as the boundary condition when solving for the face centred pressure $ \phi $.

Default is true.

◆ usePrevPressureForUStar

bool MushyLayerOptions::usePrevPressureForUStar

Set the initial value for AMRLevelMushyLayer::m_usePrevPressureForUStar.

Determines if we should use the previous $ \nabla P $ to calculate $ \mathbf{u}^* $

◆ velAdvArtVisc

Real MushyLayerOptions::velAdvArtVisc

Value of artifical viscosity to use for velocity advection solves.

Only used if MushylayerOptions::velAdvUseArtVisc is turned on

◆ writePressureInitFields

bool MushyLayerOptions::writePressureInitFields

Whether to write out plotfiles during pressure initialisation.

Useful for debugging


The documentation for this struct was generated from the following file: