Skip to content

Conversation

CusiniM
Copy link
Collaborator

@CusiniM CusiniM commented Jun 4, 2021

This PR is related to #1422

Rebaseline: https://github.com/GEOSX/integratedTests/pull/141

Integrated tests work on Lassen.

In my opinion the design works quite well. I have added the permeability models to this PR although they will only be used in #1311.
In a few words, I have created a base class template called CoupledSolid which owns method to access

  • a porosity model
  • a solid model
  • a permeability model.
template< typename SOLID_TYPE, typename PORO_TYPE, typename PERM_TYPE >
class CoupledSolid : public ConstitutiveBase
{
public:
        ...
protected:
  SOLID_TYPE const & getSolidModel() const
  { return this->getParent().template getGroup< SOLID_TYPE >( m_solidModelName ); }

  PORO_TYPE const & getPorosityModel() const
  { return this->getParent().template getGroup< PORO_TYPE >( m_porosityModelName ); }

  PERM_TYPE const & getPermModel() const
  { return this->getParent().template getGroup< PERM_TYPE >( m_permeabilityModelName ); }

  // the name of the solid model
  string m_solidModelName;

  // the name of the porosity model
  string m_porosityModelName;
  
  // the name of the permeability model
  string m_permeabilityModelName;
 };

Then, I have created 2 specialized classes:

  • PorousSolid which always has a BiotPorosity and is used solely for Poromechanics
  • CompressibleSolid which can have various porosity models and, for now, assumes a nullModel for the solid Model so that all mechanics data (e.g. stresses) are not allocated. This model is what we would use for simulations without mechanics.

For now, the damage can stay as it is ( I think) and the SOLID_TYPE can simply be a Damage etc...

Thus both the PorousSolid and the CompressibleSolid would be

template< typename SOLID_TYPE >
class PorousSolid : public CoupledSolid< SOLID_TYPE, BiotPorosity, StrainDependentPermeability >

template< typename PORO_TYPE,  typename PERM_TYPE >
class CompressibleSolid : public CoupledSolid< NullModel, PORO_TYPE, PERM_TYPE >

I am registering a PorousSolid for each type of SolidModel so that the proper solid model gets instantiated based on the input, i.e.

</PoroElasticIsotropic
   name="porousSolidName"
   solidName="solidModelName"
   porosityName="poroName"
   permeabilityName="permName"
   />
   
</ElasticIsotropic
  name="solidName"
  ...
   />
   
 </BiotPorosity
  name="poroName"
  ...
   />
  </StrainDependentPermeability
  name="permName"
  ...
   />

will automatically instantiate a PorousSolid< ElasticIsotropic > which will be a CoupledSolid<ElasticIsotropic, BiotPorosity, StrainDependentPermeability>.

The same thing could be done for the CompressibleSolid with various porosity and permeability models (I think special model could be used for very specific physics, e.g., chemical reactions that change the porosity).

@CusiniM CusiniM marked this pull request as ready for review June 14, 2021 23:22
Copy link
Contributor

@TotoGaz TotoGaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing really smart, just small C++ comments, nothing about architecture.

@CusiniM CusiniM linked an issue Jul 16, 2021 that may be closed by this pull request
@CusiniM CusiniM added ci: run CUDA builds Allows to triggers (costly) CUDA jobs and removed flag: ready for review labels Jul 21, 2021
@CusiniM CusiniM merged commit 496f5b2 into develop Jul 22, 2021
@CusiniM CusiniM deleted the cusini/feature/porousSolidModel branch July 22, 2021 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci: run CUDA builds Allows to triggers (costly) CUDA jobs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reimplement PoreVolumeCompressibleSolid to fit in solid model hierarchy

6 participants