Skip to content

Commit

Permalink
to allow initialization and update of fields in the fracture for HF s…
Browse files Browse the repository at this point in the history
…olver
  • Loading branch information
frankfeifan committed Aug 20, 2024
1 parent 4d4eb35 commit dd51266
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ real64 HydrofractureSolver< POROMECHANICS_SOLVER >::fullyCoupledSolverStep( real
if( cycleNumber == 0 && time_n <= 0 )
{
initializeNewFractureFields( domain );

flowSolver()->initializePostInitialConditionsPreSubGroups();
}

real64 dtReturn = dt;
Expand Down Expand Up @@ -869,6 +871,8 @@ void HydrofractureSolver< POROMECHANICS_SOLVER >::updateState( DomainPartition &
flowSolver()->updateStencilWeights( domain );
}

flowSolver()->updateState( domain );

forDiscretizationOnMeshTargets( domain.getMeshBodies(), [&] ( string const &,
MeshLevel & mesh,
arrayView1d< string const > const & regionNames )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "physicsSolvers/solidMechanics/kernels/SolidMechanicsLagrangianFEMKernels.hpp"
#include "physicsSolvers/surfaceGeneration/SurfaceGeneratorFields.hpp"
#include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp"
#include "fieldSpecification/FieldSpecificationManager.hpp"
#include "kernels/surfaceGenerationKernels.hpp"


Expand Down Expand Up @@ -466,7 +467,7 @@ void SurfaceGenerator::postRestartInitialization()

real64 SurfaceGenerator::solverStep( real64 const & time_n,
real64 const & dt,
const int GEOS_UNUSED_PARAM( cycleNumber ),
const int cycleNumber,
DomainPartition & domain )
{
int rval = 0;
Expand Down Expand Up @@ -554,8 +555,16 @@ real64 SurfaceGenerator::solverStep( real64 const & time_n,
permModel.initializeState();
}

if( cycleNumber == 0 && time_n + dt <= 0 )
{
/// THIS is a hack to force variables in the fractures to be initialized since they are created after initialization occurs.
FieldSpecificationManager & fsManager = FieldSpecificationManager::getInstance();;
fsManager.applyInitialConditions( meshLevel );
}
} );



return rval;
}

Expand Down

0 comments on commit dd51266

Please sign in to comment.