-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create reactive fluid transport material model #5245
Changes from 10 commits
7ad2517
2383272
2270160
2c13c93
acdd9f1
b8843c5
1318d47
4dd7f43
f688eb0
5e5bd1c
c4c283e
ce8be6f
71a5a05
7c2abdb
1cb40d3
b90fb04
2c03879
ae7eb29
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,8 @@ | ||||||
New: There is now a new material ('reactive fluid | ||||||
transport') that is designed to advect fluids and | ||||||
compute luid release and absorption based on | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
different models for fluid-rock interaction. The | ||||||
that properties of the solid are taken from a | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
base material model. | ||||||
<br> | ||||||
(John Naliboff, 2023/07/14) |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,153 @@ | ||||||
/* | ||||||
Copyright (C) 2023 by the authors of the ASPECT code. | ||||||
|
||||||
This file is part of ASPECT. | ||||||
|
||||||
ASPECT is free software; you can redistribute it and/or modify | ||||||
it under the terms of the GNU General Public License as published by | ||||||
the Free Software Foundation; either version 2, or (at your option) | ||||||
any later version. | ||||||
|
||||||
ASPECT is distributed in the hope that it will be useful, | ||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||||
GNU General Public License for more details. | ||||||
|
||||||
You should have received a copy of the GNU General Public License | ||||||
along with ASPECT; see the file LICENSE. If not see | ||||||
<http://www.gnu.org/licenses/>. | ||||||
*/ | ||||||
|
||||||
#ifndef _aspect_material_model_reactive_fluid_transport_h | ||||||
#define _aspect_material_model_reactive_fluid_transport_h | ||||||
|
||||||
#include <aspect/material_model/interface.h> | ||||||
#include <aspect/simulator_access.h> | ||||||
#include <aspect/melt.h> | ||||||
#include <aspect/utilities.h> | ||||||
#include <aspect/geometry_model/interface.h> | ||||||
|
||||||
#include <aspect/melt.h> | ||||||
#include <aspect/utilities.h> | ||||||
#include <aspect/geometry_model/interface.h> | ||||||
|
||||||
|
||||||
|
||||||
namespace aspect | ||||||
{ | ||||||
namespace MaterialModel | ||||||
{ | ||||||
using namespace dealii; | ||||||
/** | ||||||
* A material model that simulates both fluid-rock interactions | ||||||
* and the advection of fluids. It is designed to be composited with another material | ||||||
* model that computes the solid material properties. | ||||||
* @ingroup MaterialModels | ||||||
*/ | ||||||
|
||||||
template <int dim> | ||||||
class ReactiveFluidTransport : public MaterialModel::MeltInterface<dim>, public ::aspect::SimulatorAccess<dim>, public MaterialModel::MeltFractionModel<dim> | ||||||
{ | ||||||
public: | ||||||
/** | ||||||
* @copydoc MaterialModel::Interface::is_compressible() | ||||||
* | ||||||
* Returns value from material model providing compressibility. | ||||||
*/ | ||||||
bool is_compressible () const override; | ||||||
|
||||||
/** | ||||||
* @name Reference quantities | ||||||
* @{ | ||||||
*/ | ||||||
virtual double reference_darcy_coefficient () const override; | ||||||
|
||||||
/** | ||||||
* Compute the free fluid fraction that can be present in the material based on the | ||||||
* fluid content of the material and the fluid solubility for the given input conditions. | ||||||
* @p in and @p melt_fractions need to have the same size. | ||||||
* | ||||||
* @param in Object that contains the current conditions. | ||||||
* @param melt_fractions Vector of doubles that is filled with the | ||||||
* allowable free fluid fraction for each given input conditions. | ||||||
*/ | ||||||
virtual void melt_fractions (const MaterialModel::MaterialModelInputs<dim> &in, | ||||||
std::vector<double> &melt_fractions) const override; | ||||||
|
||||||
/** | ||||||
* Initialize the base model at the beginning of the model run | ||||||
* @copydoc MaterialModel::Interface::initialize() | ||||||
*/ | ||||||
void | ||||||
initialize () override; | ||||||
|
||||||
/** | ||||||
* Update the base model at the beginning of each timestep. | ||||||
*/ | ||||||
void update() override; | ||||||
|
||||||
/** | ||||||
* @copydoc MaterialModel::Interface::evaluate() | ||||||
*/ | ||||||
void | ||||||
evaluate (const typename Interface<dim>::MaterialModelInputs &in, | ||||||
typename Interface<dim>::MaterialModelOutputs &out) const override; | ||||||
|
||||||
/** | ||||||
* @copydoc MaterialModel::Interface::declare_parameters() | ||||||
*/ | ||||||
static void | ||||||
declare_parameters (ParameterHandler &prm); | ||||||
|
||||||
/** | ||||||
* @copydoc MaterialModel::Interface::parse_parameters() | ||||||
*/ | ||||||
void | ||||||
parse_parameters (ParameterHandler &prm) override; | ||||||
|
||||||
/** | ||||||
* If this material model can produce additional named outputs | ||||||
* that are derived from NamedAdditionalOutputs, create them in here. | ||||||
*/ | ||||||
virtual | ||||||
void | ||||||
create_additional_named_outputs (MaterialModel::MaterialModelOutputs<dim> &out) const override; | ||||||
|
||||||
private: | ||||||
|
||||||
/** | ||||||
* Pointer to the material model used as the base model | ||||||
*/ | ||||||
std::unique_ptr<MaterialModel::Interface<dim>> base_model; | ||||||
|
||||||
// Variables that describe the properties of the fluid, i.e. its density, | ||||||
// viscosity, and compressibility. | ||||||
// Properties of the solid are defined in the base model. | ||||||
double reference_rho_f; | ||||||
double eta_f; | ||||||
double fluid_compressibility; | ||||||
|
||||||
// Material properties governing the transport of the fluid with respect | ||||||
// to the solid, i.e., the bulk viscosity (relative to the shear viscosity), | ||||||
// the permeability, and how much the solid viscosity changes in the presence | ||||||
// of fluids. | ||||||
double shear_to_bulk_viscosity_ratio; | ||||||
double reference_permeability; | ||||||
double alpha_phi; | ||||||
|
||||||
// Time scale for fluid release and absorption. | ||||||
double fluid_reaction_time_scale; | ||||||
|
||||||
/** | ||||||
* Enumeration for selecting which type of scheme to use for reactions between. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
* fluids and solids. The only current option is a scheme where no reactions occur. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That is not true. Your scheme has a zero solubility, but there will be reactions if there is bound water at the start. So you either need to change the implementation (if you actually want no reactions) or the name of the input parameter and the documentation (to something like Or you add both, and the you actually have a choice between the two! |
||||||
*/ | ||||||
enum ReactionScheme | ||||||
{ | ||||||
no_reaction | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See above |
||||||
} fluid_solid_reaction_scheme; | ||||||
}; | ||||||
} | ||||||
} | ||||||
|
||||||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.