From 405d8e2251234e3bc217f0d3d8ec9c0f49f0418e Mon Sep 17 00:00:00 2001 From: michael Date: Fri, 10 Dec 2021 14:44:27 +0100 Subject: [PATCH] Mesh should be set befor giving input fields --- .../C/TransportEquation_1DHeatedChannel.cxx | 17 +++++++---------- .../C/TransportEquation_1DHeatedChannel_MPI.cxx | 15 +++++++-------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/CoreFlows/examples/C/TransportEquation_1DHeatedChannel.cxx b/CoreFlows/examples/C/TransportEquation_1DHeatedChannel.cxx index 2cd886d..45d706b 100755 --- a/CoreFlows/examples/C/TransportEquation_1DHeatedChannel.cxx +++ b/CoreFlows/examples/C/TransportEquation_1DHeatedChannel.cxx @@ -32,23 +32,20 @@ int main(int argc, char** argv) vector transportVelocity(1,5);//fluid velocity vector TransportEquation myProblem(LiquidPhase,around155bars600KTransport,transportVelocity); - Field VV("Enthalpy", CELLS, M, 1); - //Set rod temperature and heat exchamge coefficient - double rodTemp=623;//Rod clad temperature - double heatTransfertCoeff=1000;//fluid/solid exchange coefficient - myProblem.setRodTemperature(rodTemp); - myProblem.setHeatTransfertCoeff(heatTransfertCoeff); - - //Initial field creation + //Set initial field Vector VV_Constant(1);//initial enthalpy VV_Constant(0) = 1.3e6; cout << "Building the initial data " << endl; - - // generate initial condition myProblem.setInitialFieldConstant(M,VV_Constant); + //Set rod temperature and heat exchamge coefficient + double rodTemp=623;//Rod clad temperature + double heatTransfertCoeff=1000;//fluid/solid exchange coefficient + myProblem.setRodTemperature(rodTemp); + myProblem.setHeatTransfertCoeff(heatTransfertCoeff); + //set the boundary conditions myProblem.setBoundaryFields(boundaryFields); diff --git a/CoreFlows/examples/C/TransportEquation_1DHeatedChannel_MPI.cxx b/CoreFlows/examples/C/TransportEquation_1DHeatedChannel_MPI.cxx index 2cd886d..d97b858 100755 --- a/CoreFlows/examples/C/TransportEquation_1DHeatedChannel_MPI.cxx +++ b/CoreFlows/examples/C/TransportEquation_1DHeatedChannel_MPI.cxx @@ -34,21 +34,20 @@ int main(int argc, char** argv) TransportEquation myProblem(LiquidPhase,around155bars600KTransport,transportVelocity); Field VV("Enthalpy", CELLS, M, 1); - //Set rod temperature and heat exchamge coefficient - double rodTemp=623;//Rod clad temperature - double heatTransfertCoeff=1000;//fluid/solid exchange coefficient - myProblem.setRodTemperature(rodTemp); - myProblem.setHeatTransfertCoeff(heatTransfertCoeff); - //Initial field creation + //Set initial field Vector VV_Constant(1);//initial enthalpy VV_Constant(0) = 1.3e6; cout << "Building the initial data " << endl; - - // generate initial condition myProblem.setInitialFieldConstant(M,VV_Constant); + //Set rod temperature and heat exchamge coefficient + double rodTemp=623;//Rod clad temperature + double heatTransfertCoeff=1000;//fluid/solid exchange coefficient + myProblem.setRodTemperature(rodTemp); + myProblem.setHeatTransfertCoeff(heatTransfertCoeff); + //set the boundary conditions myProblem.setBoundaryFields(boundaryFields); -- 2.39.2