Fixed hysteresis input/output in flow_legacy

This commit is contained in:
babrodtk
2017-04-07 14:36:36 +02:00
parent 8340d26890
commit 1fd36e9451
10 changed files with 167 additions and 25 deletions

View File

@@ -797,22 +797,25 @@ protected:
ebosSimulator_.model().setMaxOilSaturation(somax[cellIdx], cellIdx);
}
VectorType& pcSwMdc_ow = state.getCellData( "PCSWMDC_OW" );
VectorType& krnSwMdc_ow = state.getCellData( "KRNSWMDC_OW" );
VectorType& pcSwMdc_go = state.getCellData( "PCSWMDC_GO" );
VectorType& krnSwMdc_go = state.getCellData( "KRNSWMDC_GO" );
for (int cellIdx = 0; cellIdx < num_cells; ++cellIdx) {
if (ebosSimulator_.problem().materialLawManager()->enableHysteresis()) {
auto matLawManager = ebosSimulator_.problem().materialLawManager();
matLawManager->setOilWaterHysteresisParams(
pcSwMdc_ow[cellIdx],
krnSwMdc_ow[cellIdx],
cellIdx);
matLawManager->setGasOilHysteresisParams(
pcSwMdc_go[cellIdx],
krnSwMdc_go[cellIdx],
cellIdx);
VectorType& pcSwMdc_ow = state.getCellData( "PCSWMDC_OW" );
VectorType& krnSwMdc_ow = state.getCellData( "KRNSWMDC_OW" );
VectorType& pcSwMdc_go = state.getCellData( "PCSWMDC_GO" );
VectorType& krnSwMdc_go = state.getCellData( "KRNSWMDC_GO" );
for (int cellIdx = 0; cellIdx < num_cells; ++cellIdx) {
matLawManager->setOilWaterHysteresisParams(
pcSwMdc_ow[cellIdx],
krnSwMdc_ow[cellIdx],
cellIdx);
matLawManager->setGasOilHysteresisParams(
pcSwMdc_go[cellIdx],
krnSwMdc_go[cellIdx],
cellIdx);
}
}
}