From: michael Date: Fri, 10 Dec 2021 13:44:27 +0000 (+0100) Subject: Mesh should be set befor giving input fields X-Git-Tag: V9_8_0~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=405d8e2251234e3bc217f0d3d8ec9c0f49f0418e;p=tools%2Fsolverlab.git Mesh should be set befor giving input fields --- 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);