mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#11405 Fault Reactivation: add temperature initial conditions.
This commit is contained in:
parent
03e1d4e762
commit
3dcca744e1
@ -114,7 +114,7 @@ std::pair<bool, std::string> RifFaultReactivationModelExporter::exportToStream(
|
||||
},
|
||||
[&]() { return printInteractionProperties( stream, frictionValue ); },
|
||||
[&]() { return printBoundaryConditions( stream, *model, partNames, boundaries ); },
|
||||
[&]() { return printPredefinedFields( stream, *model, *dataAccess, basePath, partNames, useGridVoidRatio ); },
|
||||
[&]() { return printPredefinedFields( stream, *model, *dataAccess, basePath, partNames, useGridVoidRatio, useGridTemperature ); },
|
||||
[&]() { return printInteractions( stream, partNames, borders ); },
|
||||
[&]()
|
||||
{
|
||||
@ -514,7 +514,8 @@ std::pair<bool, std::string>
|
||||
const RimFaultReactivationDataAccess& dataAccess,
|
||||
const std::string& exportBasePath,
|
||||
const std::map<RimFaultReactivation::GridPart, std::string>& partNames,
|
||||
bool voidRatioFromEclipse )
|
||||
bool voidRatioFromEclipse,
|
||||
bool useGridTemperature )
|
||||
{
|
||||
// PREDEFINED FIELDS
|
||||
struct PredefinedField
|
||||
@ -558,6 +559,22 @@ std::pair<bool, std::string>
|
||||
RifInpExportTools::printHeading( stream, "INCLUDE, input=" + fileName.toStdString() );
|
||||
}
|
||||
|
||||
if ( useGridTemperature )
|
||||
{
|
||||
// Export the temperature to a separate inp file for each step
|
||||
std::string propertyName = "TEMPERATURE";
|
||||
std::string fullPath = exportBasePath + "_" + propertyName + ".inp";
|
||||
auto [filePath, fileName] = RiaFilePathTools::toFolderAndFileName( QString::fromStdString( fullPath ) );
|
||||
|
||||
// Use temperature from first time step
|
||||
size_t timeStep = 0;
|
||||
bool isOk = writePropertyToFile( model, dataAccess, RimFaultReactivation::Property::Temperature, timeStep, fullPath, partNames, "" );
|
||||
if ( !isOk ) return { false, "Failed to create " + propertyName + " file." };
|
||||
|
||||
RifInpExportTools::printHeading( stream, "Initial Conditions, TYPE=" + propertyName );
|
||||
RifInpExportTools::printHeading( stream, "INCLUDE, input=" + fileName.toStdString() );
|
||||
}
|
||||
|
||||
// stress export
|
||||
{
|
||||
// Export the stress to a separate inp file
|
||||
|
@ -74,7 +74,8 @@ private:
|
||||
const RimFaultReactivationDataAccess& dataAccess,
|
||||
const std::string& exportDirectory,
|
||||
const std::map<RimFaultReactivation::GridPart, std::string>& partNames,
|
||||
bool useGridVoidRatio );
|
||||
bool useGridVoidRatio,
|
||||
bool useGridTemperature );
|
||||
static std::pair<bool, std::string> printSteps( std::ostream& stream,
|
||||
const RigFaultReactivationModel& model,
|
||||
const RimFaultReactivationDataAccess& dataAccess,
|
||||
|
Loading…
Reference in New Issue
Block a user