-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Significant changes to improve hillslope permafrost runs: (1) fixes a minor bug in depression storage evaluator (2) add the "magic omega" kr model from Niu and Yang (2006) which allows more water to infiltrate during frozen conditions, resulting in higher infiltration and less runoff during snowmelt (3) revised air resistance, but set default coeffs to 0. So while this does not change the default model, there are more options there now. (4) Adds options to use the Sellers model of evaporative resistance vs the previous model of Sakagucki & Zeng model, keeping S&Z as the default. The Sellers model has no free parameter, but may work well in some cases. --------- Co-authored-by: Ethan Coon <coonet@ornl.gov>
- Loading branch information
Showing
11 changed files
with
657 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
444 changes: 444 additions & 0 deletions
444
src/pks/flow/constitutive_relations/wrm/rel_perm_frzBC_evaluator.cc
Large diffs are not rendered by default.
Oops, something went wrong.
128 changes: 128 additions & 0 deletions
128
src/pks/flow/constitutive_relations/wrm/rel_perm_frzBC_evaluator.hh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
/* | ||
Copyright 2010-202x held jointly by participating institutions. | ||
ATS is released under the three-clause BSD License. | ||
The terms of use and "as is" disclaimer for this license are | ||
provided in the top-level COPYRIGHT file. | ||
Authors: Ethan Coon (ecoon@lanl.gov) | ||
Bo Gao (gaob@ornl.gov) | ||
*/ | ||
|
||
//! Evaluates relative permeability using an empirical model for frozen conditions. | ||
/*! | ||
This is an empirical relative permeability model according to Niu and Yang (2006). | ||
This model is based on Brooks-Corey relative permeability model and an additional | ||
coefficient term is added to account for the effect of soil ice. This model is | ||
used for freezing conditions to make snowmelt water infiltrate deeper. See paper | ||
Agnihotri et al. (2023) for discussions about the influence of relative permeability | ||
model on discharge under freezing conditions. | ||
.. math:: | ||
k_{rel} = ( 1 - F_{frz} ) \times ( \frac{1 - s_{g} - s_r}{1 - s_r} )^{2*b + 3} \\ | ||
F_{frz} = \mathrm{exp}( -\omega \times ( s_{l} + s_{g} ) ) - \mathrm{exp}( -\omega ) | ||
Note this implementation is currently a bit inconsistent in that it uses WRMs | ||
to get the residual saturation, and uses a global value for b, the Clapp and | ||
Hornberger parameter (equivalent to 1/lambda in Brooks & Corey). This will be | ||
fixed shortly (see ticket #196) to make b spatially variable by WRM. | ||
.. _rel-perm-evaluator-spec | ||
.. admonition:: rel-perm-evaluator-spec | ||
* `"use density on viscosity in rel perm`" ``[bool]`` **true** | ||
* `"boundary rel perm strategy`" ``[string]`` **boundary pressure** Controls | ||
how the rel perm is calculated on boundary faces. Note, this may be | ||
overwritten by upwinding later! One of: | ||
- `"boundary pressure`" Evaluates kr of pressure on the boundary face, upwinds normally. | ||
- `"interior pressure`" Evaluates kr of the pressure on the interior cell (bad idea). | ||
- `"harmonic mean`" Takes the harmonic mean of kr on the boundary face and kr on the interior cell. | ||
- `"arithmetic mean`" Takes the arithmetic mean of kr on the boundary face and kr on the interior cell. | ||
- `"one`" Sets the boundary kr to 1. | ||
- `"surface rel perm`" Looks for a field on the surface mesh and uses that. | ||
* `"minimum rel perm cutoff`" ``[double]`` **0.** Provides a lower bound on rel perm. | ||
* `"permeability rescaling`" ``[double]`` Typically rho * kr / mu is very big | ||
and K_sat is very small. To avoid roundoff propagation issues, rescaling | ||
this quantity by offsetting and equal values is encourage. Typically 10^7 or so is good. | ||
* `"omega [-]`" ``[double]`` **2.0** A scale dependent parameter in the relative permeability model. | ||
See paper Niu & Yang (2006) for details about the model. Typical values range from 2-3. | ||
* `"Clapp and Hornberger b [-]`" ``[double]`` **2.0** Clapp-Hornberger b parameter. | ||
* `"WRM parameters`" ``[wrm-typedinline-spec-list]`` List (by region) of WRM specs. | ||
KEYS: | ||
- `"rel perm`" | ||
- `"saturation_liquid`" | ||
- `"saturation_gas`" | ||
- `"density`" (if `"use density on viscosity in rel perm`" == true) | ||
- `"viscosity`" (if `"use density on viscosity in rel perm`" == true) | ||
- `"surface relative permeability`" (if `"boundary rel perm strategy`" == `"surface rel perm`") | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "wrm.hh" | ||
#include "wrm_partition.hh" | ||
#include "rel_perm_evaluator.hh" | ||
#include "EvaluatorSecondaryMonotype.hh" | ||
#include "Factory.hh" | ||
|
||
namespace Amanzi { | ||
namespace Flow { | ||
|
||
class RelPermFrzBCEvaluator : public EvaluatorSecondaryMonotypeCV { | ||
public: | ||
// constructor format for all derived classes | ||
explicit RelPermFrzBCEvaluator(Teuchos::ParameterList& plist); | ||
|
||
RelPermFrzBCEvaluator(Teuchos::ParameterList& plist, const Teuchos::RCP<WRMPartition>& wrms); | ||
|
||
RelPermFrzBCEvaluator(const RelPermFrzBCEvaluator& other) = default; | ||
virtual Teuchos::RCP<Evaluator> Clone() const override; | ||
|
||
Teuchos::RCP<WRMPartition> get_WRMs() { return wrms_; } | ||
|
||
protected: | ||
virtual void EnsureCompatibility_ToDeps_(State& S) override; | ||
|
||
// Required methods from EvaluatorSecondaryMonotypeCV | ||
virtual void Evaluate_(const State& S, const std::vector<CompositeVector*>& result) override; | ||
virtual void EvaluatePartialDerivative_(const State& S, | ||
const Key& wrt_key, | ||
const Tag& wrt_tag, | ||
const std::vector<CompositeVector*>& result) override; | ||
|
||
protected: | ||
void InitializeFromPlist_(); | ||
|
||
Teuchos::RCP<WRMPartition> wrms_; | ||
Key sat_key_; | ||
Key sat_gas_key_; | ||
Key dens_key_; | ||
Key visc_key_; | ||
Key surf_rel_perm_key_; | ||
|
||
bool is_dens_visc_; | ||
Key surf_domain_; | ||
BoundaryRelPerm boundary_krel_; | ||
|
||
double perm_scale_; | ||
double min_val_; | ||
double omega_; | ||
double b_; | ||
|
||
private: | ||
static Utils::RegisteredFactory<Evaluator, RelPermFrzBCEvaluator> factory_; | ||
}; | ||
|
||
} // namespace Flow | ||
} // namespace Amanzi | ||
|
20 changes: 20 additions & 0 deletions
20
src/pks/flow/constitutive_relations/wrm/rel_perm_frzBC_evaluator_reg.hh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
Copyright 2010-202x held jointly by participating institutions. | ||
ATS is released under the three-clause BSD License. | ||
The terms of use and "as is" disclaimer for this license are | ||
provided in the top-level COPYRIGHT file. | ||
Authors: Ethan Coon (ecoon@lanl.gov), Bo Gao (gaob@ornl.gov) | ||
*/ | ||
|
||
#include "rel_perm_frzBC_evaluator.hh" | ||
|
||
namespace Amanzi { | ||
namespace Flow { | ||
|
||
// registry of method | ||
Utils::RegisteredFactory<Evaluator, RelPermFrzBCEvaluator> | ||
RelPermFrzBCEvaluator::factory_("Brooks-Corey based high frozen rel perm"); | ||
|
||
} // namespace Flow | ||
} // namespace Amanzi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters