diff --git a/appl/conjugateheattransfer/iterative/main_freeflow.cc b/appl/conjugateheattransfer/iterative/main_freeflow.cc index e454639d948491360ec002010871c9adf201811a..27532ee5fc7510391d64e1cc07cfc72ad48fff63 100644 --- a/appl/conjugateheattransfer/iterative/main_freeflow.cc +++ b/appl/conjugateheattransfer/iterative/main_freeflow.cc @@ -219,12 +219,7 @@ int main(int argc, char** argv) try couplingInterface.announceInitialDataWritten(); } couplingInterface.initializeData(); -/* - if (couplingInterface.isInitialDataAvailable()) - { - couplingInterface.readHeatFluxFromOtherSolver(); - } -*/ + // instantiate time loop using Scalar = GetPropType<FreeFlowTypeTag, Properties::Scalar>; const auto tEnd = getParam<Scalar>("TimeLoop.TEnd"); @@ -263,7 +258,7 @@ int main(int argc, char** argv) try } // Read heat flux from precice. - couplingInterface.readHeatFluxFromOtherSolver(); + couplingInterface.readTemperatureFromOtherSolver(); // set previous solution for storage evaluations assembler->setPreviousSolution(solOld); @@ -273,7 +268,7 @@ int main(int argc, char** argv) try // make the new solution the old solution //TODO DO WE HAVE TO MOVE THAT? - solOld = sol; + //solOld = sol; freeFlowGridVariables->advanceTimeStep(); // Write heatflux to wrapper @@ -292,6 +287,7 @@ int main(int argc, char** argv) try { //Read checkpoint sol = sol_checkpoint; + //freeFlowGridVariables->advanceTimeStep(); freeFlowGridVariables->update(sol); couplingInterface.announceIterationCheckpointRead(); } @@ -306,6 +302,8 @@ int main(int argc, char** argv) try // report statistics of this time step timeLoop->reportTimeStep(); + solOld = sol; + } } while (!timeLoop->finished() && couplingInterface.isCouplingOngoing()); diff --git a/appl/conjugateheattransfer/iterative/main_solidenergy.cc b/appl/conjugateheattransfer/iterative/main_solidenergy.cc index 380a794b30fae9c3abe4d3f58125371f5590ac3d..95194de64efc4501e924902437f98fea580247c7 100644 --- a/appl/conjugateheattransfer/iterative/main_solidenergy.cc +++ b/appl/conjugateheattransfer/iterative/main_solidenergy.cc @@ -228,12 +228,6 @@ int main(int argc, char** argv) try } couplingInterface.initializeData(); -/* - if (couplingInterface.isInitialDataAvailable()) - { - couplingInterface.readHeatFluxFromOtherSolver(); - } - */ // instantiate time loop using Scalar = GetPropType<SolidEnergyTypeTag, Properties::Scalar>; const auto tEnd = getParam<Scalar>("TimeLoop.TEnd"); @@ -290,7 +284,6 @@ int main(int argc, char** argv) try // make the new solution the old solution //TODO DO WE HAVE TO MOVE THAT? - solOld = sol; solidEnergyGridVariables->advanceTimeStep(); setBoundaryTemperatures<GetPropType<SolidEnergyTypeTag, Properties::ThermalConductivityModel>>(*solidEnergyProblem, *solidEnergyGridVariables, sol ); @@ -307,6 +300,7 @@ int main(int argc, char** argv) try { //Read checkpoint sol = sol_checkpoint; + //solidEnergyGridVariables->advanceTimeStep(); solidEnergyGridVariables->update(sol); couplingInterface.announceIterationCheckpointRead(); } @@ -321,10 +315,7 @@ int main(int argc, char** argv) try // report statistics of this time step timeLoop->reportTimeStep(); - // Get the temperature here - // TODO - - + solOld = sol; } } while (!timeLoop->finished() && couplingInterface.isCouplingOngoing() ); diff --git a/appl/conjugateheattransfer/monolithic/problem_heat.hh b/appl/conjugateheattransfer/monolithic/problem_heat.hh index 2bdf2dd91ac121ede06cde04f4beadc87205d203..832a32f1a2b1d1aa4bbb1d1ac0a7caffcc3639ad 100644 --- a/appl/conjugateheattransfer/monolithic/problem_heat.hh +++ b/appl/conjugateheattransfer/monolithic/problem_heat.hh @@ -180,7 +180,8 @@ public: const auto faceId = scvf.index(); if ( couplingInterface_.isCoupledEntity(faceId) ) { - values[Indices::energyEqIdx] = couplingInterface_.getHeatFluxOnFace(faceId) ; + // ALEX: I made the heat flux negative since the normal vectors of both solvers are different! + values[Indices::energyEqIdx] = - couplingInterface_.getHeatFluxOnFace(faceId) ; } #endif