Skip to content

Commit

Permalink
Use S5 for top, fault and base surfaces.
Browse files Browse the repository at this point in the history
Add expansion material parameter (requires updated XML)
  • Loading branch information
jonjenssen committed Feb 24, 2024
1 parent 6fe997b commit 09151ec
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ std::pair<bool, std::string> RifFaultReactivationModelExporter::exportToStream(

// The two parts are "mirrored", so face number 4 of the two parts should face eachother.
using FaultGridPart = RimFaultReactivation::GridPart;
std::map<std::pair<FaultGridPart, PartBorderSurface>, int> faces = { { { FaultGridPart::FW, PartBorderSurface::FaultSurface }, 4 },
{ { FaultGridPart::FW, PartBorderSurface::UpperSurface }, 4 },
{ { FaultGridPart::FW, PartBorderSurface::LowerSurface }, 4 },
std::map<std::pair<FaultGridPart, PartBorderSurface>, int> faces = { { { FaultGridPart::FW, PartBorderSurface::FaultSurface }, 5 },
{ { FaultGridPart::FW, PartBorderSurface::UpperSurface }, 5 },
{ { FaultGridPart::FW, PartBorderSurface::LowerSurface }, 5 },
{ { FaultGridPart::FW, PartBorderSurface::Seabed }, 2 },
{ { FaultGridPart::HW, PartBorderSurface::FaultSurface }, 4 },
{ { FaultGridPart::HW, PartBorderSurface::UpperSurface }, 4 },
{ { FaultGridPart::HW, PartBorderSurface::LowerSurface }, 4 },
{ { FaultGridPart::HW, PartBorderSurface::FaultSurface }, 5 },
{ { FaultGridPart::HW, PartBorderSurface::UpperSurface }, 5 },
{ { FaultGridPart::HW, PartBorderSurface::LowerSurface }, 5 },
{ { FaultGridPart::HW, PartBorderSurface::Seabed }, 2 } };

std::map<FaultGridPart, std::string> partNames = {
Expand Down Expand Up @@ -327,14 +327,15 @@ std::pair<bool, std::string>
double poissonNumber;
double permeability1;
double permeability2;
double expansion;
};

RifInpExportTools::printSectionComment( stream, "MATERIALS" );
std::vector<Material> materials;

for ( auto [element, materialName] : materialNames )
{
std::array<double, 3> parameters = rimModel.materialParameters( element );
std::array<double, 4> parameters = rimModel.materialParameters( element );

// Incoming unit for Young's Modulus is GPa: convert to Pa.
double youngsModulus = RiaEclipseUnitTools::gigaPascalToPascal( parameters[0] );
Expand All @@ -345,12 +346,15 @@ std::pair<bool, std::string>
// Unit is already kg/m^3
double density = parameters[2];

double expansion = parameters[3];

materials.push_back( Material{ .name = materialName,
.density = density,
.youngsModulus = youngsModulus,
.poissonNumber = poissonNumber,
.permeability1 = 1e-09,
.permeability2 = 0.3 } );
.permeability2 = 0.3,
.expansion = expansion } );
}

for ( Material mat : materials )
Expand Down Expand Up @@ -378,6 +382,8 @@ std::pair<bool, std::string>

RifInpExportTools::printHeading( stream, "Permeability, specific=1." );
RifInpExportTools::printNumbers( stream, { mat.permeability1, mat.permeability2 } );
RifInpExportTools::printHeading( stream, "Expansion" );
RifInpExportTools::printNumbers( stream, { mat.expansion } );
}

if ( densityFromGrid )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -735,9 +735,9 @@ std::string RimFaultReactivationModel::baseFilePath() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::array<double, 3> RimFaultReactivationModel::materialParameters( ElementSets elementSet ) const
std::array<double, 4> RimFaultReactivationModel::materialParameters( ElementSets elementSet ) const
{
std::array<double, 3> retVal = { 0.0, 0.0, 0.0 };
std::array<double, 4> retVal = { 0.0, 0.0, 0.0, 0.0 };
static std::map<ElementSets, std::string> groupMap = { { ElementSets::OverBurden, "material_overburden" },
{ ElementSets::Reservoir, "material_reservoir" },
{ ElementSets::IntraReservoir, "material_intrareservoir" },
Expand All @@ -753,6 +753,7 @@ std::array<double, 3> RimFaultReactivationModel::materialParameters( ElementSets
retVal[0] = grp->parameterDoubleValue( "youngs_modulus", 0.0 );
retVal[1] = grp->parameterDoubleValue( "poissons_number", 0.0 );
retVal[2] = grp->parameterDoubleValue( "density", 0.0 );
retVal[3] = grp->parameterDoubleValue( "expansion", 0.0 );

break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class RimFaultReactivationModel : public RimCheckableNamedObject, public RimPoly
std::vector<QDateTime> selectedTimeSteps() const;
std::vector<size_t> selectedTimeStepIndexes() const;

std::array<double, 3> materialParameters( ElementSets elementSet ) const;
std::array<double, 4> materialParameters( ElementSets elementSet ) const;

QStringList commandParameters() const;

Expand Down

0 comments on commit 09151ec

Please sign in to comment.