Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
13a64a2
Add darcy solver implementation and test case
mmegally Aug 21, 2026
49c5bf6
Fix function signatures in header file
mmegally Aug 21, 2026
e284118
add convergence tests for darcy implementation
mmegally Aug 25, 2026
b1cd373
Add Regazzoni model to validate Ubuntu/macOS integration tests (added…
mmegally Aug 26, 2026
bae4ba1
Remove unintended SLURM files
mmegally Aug 26, 2026
12e5427
Merge branch 'main' into darcy-solver
ktbolt Aug 26, 2026
e65e247
Addressing pull request comments (removed tests from CI suite and Zac…
mmegally Aug 27, 2026
993bbc5
Addressing first set of comments from Michele (includes changing 'Phy…
mmegally Sep 1, 2026
d063397
fixing unit test PhysicalPropertyType dependency
mmegally Sep 1, 2026
5682189
Reducing darcy coverage for 2D/3D and changing output names
mmegally Sep 1, 2026
dc2b9bb
Merge branch 'main' into darcy-solver
mmegally Sep 2, 2026
294af52
Merge branch 'main' into darcy-solver
mmegally Sep 3, 2026
68fe6ae
Removing empty NURBS block and fixing recent PhysicalPropertyType cha…
mmegally Sep 3, 2026
59f6444
docs: clarify Darcy pressure and flux outputs
zasexton Sep 1, 2026
6189ba6
refactor: scope Darcy material parameter names
zasexton Sep 1, 2026
1d9d562
fix: validate Darcy material parameters
zasexton Sep 1, 2026
99c80d1
docs: align the Darcy equation with assembly
zasexton Sep 2, 2026
3344986
docs: state the Darcy single-field formulation
zasexton Sep 2, 2026
5b094b4
docs: retain permeability in the diffusion operator
zasexton Sep 2, 2026
7b4ca1c
docs: define Darcy model quantities and ranges
zasexton Sep 2, 2026
a785875
docs: document the Darcy namespace and references
zasexton Sep 2, 2026
5b7d582
fix: reject embedded-line Darcy use
zasexton Sep 2, 2026
8eb5ec5
refactor: clarify Darcy flux reconstruction
zasexton Sep 2, 2026
71d99b2
Merge pull request #1 from zasexton/review/pr-620-michele
mmegally Sep 3, 2026
c83bcec
Merge branch 'main' into darcy-solver
zasexton Sep 9, 2026
a87e729
fix: initialize pressure using equation DOFs
zasexton Sep 10, 2026
3b014e7
Merge branch 'main' into darcy-solver
zasexton Sep 10, 2026
3d3d457
First set of comments: dropping element validation in inappropriate p…
mmegally Sep 11, 2026
e8bda34
Merge pull request #2 from zasexton/review/pr-620-comment-3887103709
mmegally Sep 11, 2026
a9bbd48
Renaming Darcy_media_compressibility to Darcy_compressibility & addin…
mmegally Sep 11, 2026
a68f7c4
Fixing instance of darcy_compressibility
mmegally Sep 11, 2026
623192f
fixing incomplete removal of runtime error call from std namespace
mmegally Sep 11, 2026
c159793
fixing svmp exception calls
mmegally Sep 11, 2026
d9c4cc8
L2 projection and volume-weighted flux.
zasexton Sep 15, 2026
28f48ec
Merge pull request #3 from zasexton/review/pr-620-latest
mmegally Sep 15, 2026
3125479
Merge branch 'main' into darcy-solver
zasexton Sep 17, 2026
ae99df4
dropping context tag
mmegally Sep 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Code/Source/solver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ set(CSRCS
cmm.h cmm.cpp
consts.h consts.cpp
contact.h contact.cpp
darcy.h darcy.cpp
distribute.h distribute.cpp
eq_assem.h eq_assem.cpp
fluid.h fluid.cpp
Expand Down
2 changes: 1 addition & 1 deletion Code/Source/solver/ComMod.h
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ class dmnType

// General physical properties such as density, elastic modulus...
// FIX davep double prop[maxNProp] ;
std::map<consts::PhysicalProperyType,double> prop;
std::map<consts::PhysicalPropertyType,double> prop;
//double prop[consts::maxNProp];

// Electrophysiology model
Expand Down
9 changes: 7 additions & 2 deletions Code/Source/solver/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2052,6 +2052,11 @@ DomainParameters::DomainParameters() {

set_parameter("Penalty_parameter", 0.0, !required, penalty_parameter);
set_parameter("Poisson_ratio", 0.3, !required, poisson_ratio);

set_parameter("Darcy_permeability", 1e-15, !required, darcy_permeability);
set_parameter("Darcy_compressibility", 0.0, !required,
darcy_compressibility);
set_parameter("Darcy_fluid_viscosity", 1.0, !required, darcy_fluid_viscosity);

set_parameter("Relative_tolerance", 1e-4, !required, relative_tolerance);
set_parameter("Shell_thickness", 0.0, !required, shell_thickness);
Expand All @@ -2060,8 +2065,8 @@ DomainParameters::DomainParameters() {
set_parameter("Time_step_for_integration", 0.0, !required,
time_step_for_integration);

set_parameter("Inverse_darcy_permeability", 0.0, !required,
inverse_darcy_permeability);
set_parameter("Brinkman_inverse_permeability", 0.0, !required,
brinkman_inverse_permeability);

// Ionic model parameters.
IonicModelFactory::visit(
Expand Down
12 changes: 7 additions & 5 deletions Code/Source/solver/Parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -1661,8 +1661,13 @@ class DomainParameters : public ParameterLists
Parameter<double> source_term;
Parameter<double> time_step_for_integration;

// Inverse of Darcy permeability. Default value of 0.0 for Navier-Stokes and non-zero for Navier-Stokes-Brinkman
Parameter<double> inverse_darcy_permeability;
Parameter<double> darcy_permeability;
Parameter<double> darcy_compressibility;
Parameter<double> darcy_fluid_viscosity;

// Inverse permeability K^{-1} used in the Brinkman drag term
// mu K^{-1} u. A value of zero disables Brinkman drag.
Parameter<double> brinkman_inverse_permeability;
};

/// @brief The RemesherParameters class stores parameters for the
Expand Down Expand Up @@ -1783,9 +1788,6 @@ class EquationParameters : public ParameterLists
// and only then is the mesh equation solved.
Parameter<bool> explicit_geometric_coupling;

// Inverse of Darcy permeability. Default value of 0.0 for Navier-Stokes and non-zero for Navier-Stokes-Brinkman
Parameter<double> inverse_darcy_permeability;

// Sub-element parameters.
//
std::vector<BodyForceParameters*> body_forces;
Expand Down
8 changes: 4 additions & 4 deletions Code/Source/solver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ C++ functions are defined within a `namespace` defined for each Fortran file. Fo
- [<b> fs::get_thood_fs(com_mod, fs, lM, vmsStab, 1) </b>](#)
- [<b> nn::gnn(fs[1].eNoN, nsd, nsd, Nx, xql, Nqx, Jac, ksix) </b>](#)
- [<b> nn::gn_nxx(l, fs[0].eNoN, nsd, nsd, Nx, Nxx, xwl, Nwx, Nwxx) </b>](#)
- [<b> fluid_3d_m(com_mod, vmsStab, fs[0].eNoN, fs[1].eNoN, w, ksix, N0, N1, Nwx, Nqx, Nwxx, al, yl, bfl, lR, lK, K_inverse_darcy_permeability)</b>](#) - If nsd=3
- [<b> fluid_2d_m(com_mod, vmsStab, fs[0].eNoN, fs[1].eNoN, w, ksix, N0, N1, Nwx, Nqx, Nwxx, al, yl, bfl, lR, lK, K_inverse_darcy_permeability)</b>](#) - If nsd=2
- [<b> fluid_3d_m(com_mod, vmsStab, fs[0].eNoN, fs[1].eNoN, w, ksix, N0, N1, Nwx, Nqx, Nwxx, al, yl, bfl, lR, lK, brinkman_inverse_permeability)</b>](#) - If nsd=3
- [<b> fluid_2d_m(com_mod, vmsStab, fs[0].eNoN, fs[1].eNoN, w, ksix, N0, N1, Nwx, Nqx, Nwxx, al, yl, bfl, lR, lK, brinkman_inverse_permeability)</b>](#) - If nsd=2
- [<b> trilinos_doassem_(const_cast<int&>(eNoN), ptr.data(), lK.data(), lR.data())</b>](#) - If using Trilinos
- [<b> lhsa_ns::do_assem(com_mod, eNoN, ptr, lK, lR)</b>](#do_assem) - If not using Trilinos
- [<b> set_bc::set_bc_neu(com_mod, cm_mod, Yg, Dg) </b>](#set_bc_neu)
Expand Down Expand Up @@ -1492,9 +1492,9 @@ strongly or weakly.

- `nn::gn_nxx(l, fs[0].eNoN, nsd, nsd, Nx, Nxx, xwl, Nwx, Nwxx)`

- `fluid_3d_m(com_mod, vmsStab, fs[0].eNoN, fs[1].eNoN, w, ksix, N0, N1, Nwx, Nqx, Nwxx, al, yl, bfl, lR, lK, K_inverse_darcy_permeability)` - If nsd=3
- `fluid_3d_m(com_mod, vmsStab, fs[0].eNoN, fs[1].eNoN, w, ksix, N0, N1, Nwx, Nqx, Nwxx, al, yl, bfl, lR, lK, brinkman_inverse_permeability)` - If nsd=3

- `fluid_2d_m(com_mod, vmsStab, fs[0].eNoN, fs[1].eNoN, w, ksix, N0, N1, Nwx, Nqx, Nwxx, al, yl, bfl, lR, lK, K_inverse_darcy_permeability)` - If nsd=2
- `fluid_2d_m(com_mod, vmsStab, fs[0].eNoN, fs[1].eNoN, w, ksix, N0, N1, Nwx, Nqx, Nwxx, al, yl, bfl, lR, lK, brinkman_inverse_permeability)` - If nsd=2

- `trilinos_doassem_(const_cast<int&>(eNoN), ptr.data(), lK.data(), lR.data())` - If using Trilinos

Expand Down
24 changes: 12 additions & 12 deletions Code/Source/solver/cmm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ void cmm_3d(ComMod& com_mod, const int eNoN, const double w, const Vector<double
const double ctM = 1.0;
const double ctC = 36.0;

double rho = dmn.prop.at(PhysicalProperyType::fluid_density);
Vector<double> f({dmn.prop.at(PhysicalProperyType::f_x),
dmn.prop.at(PhysicalProperyType::f_y),
dmn.prop.at(PhysicalProperyType::f_z)});
double rho = dmn.prop.at(PhysicalPropertyType::fluid_density);
Vector<double> f({dmn.prop.at(PhysicalPropertyType::f_x),
dmn.prop.at(PhysicalPropertyType::f_y),
dmn.prop.at(PhysicalPropertyType::f_z)});

double T1 = eq.af * eq.gam * dt;
double amd = eq.am/T1;
Expand Down Expand Up @@ -429,10 +429,10 @@ void cmm_mass(ComMod& com_mod, const double w, const Vector<double>& N, const Ar
#endif

Vector<double> f(3);
double rho = eq.dmn[cDmn].prop.at(PhysicalProperyType::solid_density);
f(0) = eq.dmn[cDmn].prop.at(PhysicalProperyType::f_x);
f(1) = eq.dmn[cDmn].prop.at(PhysicalProperyType::f_y);
f(2) = eq.dmn[cDmn].prop.at(PhysicalProperyType::f_z);
double rho = eq.dmn[cDmn].prop.at(PhysicalPropertyType::solid_density);
f(0) = eq.dmn[cDmn].prop.at(PhysicalPropertyType::f_x);
f(1) = eq.dmn[cDmn].prop.at(PhysicalPropertyType::f_y);
f(2) = eq.dmn[cDmn].prop.at(PhysicalPropertyType::f_z);
#ifdef debug_cmm_mass
dmsg << "rho: " << rho ;
dmsg << "f: " << f ;
Expand All @@ -444,7 +444,7 @@ void cmm_mass(ComMod& com_mod, const double w, const Vector<double>& N, const Ar
if (com_mod.cmmVarWall) {
ht = vwp(0);
} else {
ht = eq.dmn[cDmn].prop.at(PhysicalProperyType::shell_thickness);
ht = eq.dmn[cDmn].prop.at(PhysicalPropertyType::shell_thickness);
}

double wl = w * ht * rho;
Expand Down Expand Up @@ -497,7 +497,7 @@ void cmm_stiffness(ComMod& com_mod, const Array<double>& Nxi, const Array<double
const double dt = com_mod.dt;
const auto cDmn = com_mod.cDmn;

double nu = eq.dmn[cDmn].prop.at(PhysicalProperyType::poisson_ratio);
double nu = eq.dmn[cDmn].prop.at(PhysicalPropertyType::poisson_ratio);
double ht, elM;

if (com_mod.cmmVarWall) {
Expand All @@ -507,8 +507,8 @@ void cmm_stiffness(ComMod& com_mod, const Array<double>& Nxi, const Array<double
// elasticity modulus
elM = vwp[1];
} else {
ht = eq.dmn[cDmn].prop.at(PhysicalProperyType::shell_thickness);
elM = eq.dmn[cDmn].prop.at(PhysicalProperyType::elasticity_modulus);
ht = eq.dmn[cDmn].prop.at(PhysicalPropertyType::shell_thickness);
elM = eq.dmn[cDmn].prop.at(PhysicalPropertyType::elasticity_modulus);
}

double lam = elM /(1.0 - nu*nu);
Expand Down
2 changes: 2 additions & 0 deletions Code/Source/solver/consts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ const std::map<std::string,EquationType> equation_name_to_type = {

{"shell", EquationType::phys_shell},

{"darcy", EquationType::phys_darcy},

{"solid_heat", EquationType::phys_heatS},
{"heatS", EquationType::phys_heatS},
{"laplace", EquationType::phys_heatS},
Expand Down
16 changes: 12 additions & 4 deletions Code/Source/solver/consts.h
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,11 @@ enum class EquationType
phys_CMM = 209,
phys_CEP = 210,
phys_ustruct = 211, // Nonlinear elastodynamics using mixed VMS-stabilized formulation
phys_stokes = 212
phys_stokes = 212,
phys_darcy = 213
Comment thread
zasexton marked this conversation as resolved.
};

constexpr auto Equation_darcy = EquationType::phys_darcy;
constexpr auto Equation_CMM = EquationType::phys_CMM;
constexpr auto Equation_CEP = EquationType::phys_CEP;
constexpr auto Equation_fluid = EquationType::phys_fluid;
Expand Down Expand Up @@ -347,6 +349,7 @@ enum class OutputNameType {
outGrp_activeTensionFibers = 529,
outGrp_activeTensionSheets = 530,
outGrp_activeTensionNormal = 531,
outGrp_darcyFlux = 532,

out_velocity = 599,
out_pressure = 598,
Expand Down Expand Up @@ -380,7 +383,9 @@ enum class OutputNameType {
out_fibStretchRate = 570,
out_activeTensionFibers = 569,
out_activeTensionSheets = 568,
out_activeTensionNormal = 567
out_activeTensionNormal = 567,
out_darcyPressure = 566,
out_darcyFlux = 565
};

/// @brief Simulation output file types.
Expand All @@ -396,7 +401,7 @@ extern const std::map<std::string,OutputType> output_type_name_to_type;

/// @brief Possible physical properties. Current maxNPror is 20.
//
enum class PhysicalProperyType
enum class PhysicalPropertyType
{
NA = 0,
fluid_density = 1,
Expand All @@ -413,7 +418,10 @@ enum class PhysicalProperyType
shell_thickness = 12,
ctau_M = 13, // stabilization coeffs. for USTRUCT (momentum, continuity)
ctau_C = 14,
inverse_darcy_permeability = 15
brinkman_inverse_permeability = 15,
darcy_permeability = 16,
darcy_compressibility = 17,
darcy_fluid_viscosity = 18
};

enum class PreconditionerType
Expand Down
Loading
Loading