From: michael Date: Fri, 10 Dec 2021 13:41:49 +0000 (+0100) Subject: Minor restructuration X-Git-Tag: V9_8_0~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6270e0406fe4c0f3324d641620fe338e370e2c6e;p=tools%2Fsolverlab.git Minor restructuration --- diff --git a/CoreFlows/examples/C/CoupledTransportDiffusionEquations_1DHeatedChannel.cxx b/CoreFlows/examples/C/CoupledTransportDiffusionEquations_1DHeatedChannel.cxx index a2d8782..a5cce6e 100755 --- a/CoreFlows/examples/C/CoupledTransportDiffusionEquations_1DHeatedChannel.cxx +++ b/CoreFlows/examples/C/CoupledTransportDiffusionEquations_1DHeatedChannel.cxx @@ -63,10 +63,21 @@ int main(int argc, char** argv) double lambda_ur=5; TransportEquation myTransportEquation(LiquidPhase, around155bars600KTransport,transportVelocity); - Field fluidEnthalpy("Enthalpie", CELLS, transportMesh, 1); + bool FECalculation=false; DiffusionEquation myDiffusionEquation(spaceDim,FECalculation,rho_ur, cp_ur, lambda_ur); + + //Set initial field + cout << "Construction de la condition initiale " << endl; + + Vector VV_Constant(1); + VV_Constant(0) = 623;//Rod clad temperature nucleaire + myDiffusionEquation.setInitialFieldConstant(diffusionMesh,VV_Constant); + + VV_Constant(0) = 1.3e6; + myTransportEquation.setInitialFieldConstant(transportMesh,VV_Constant); + Field solidTemp("Solid temperature", CELLS, diffusionMesh, 1); Field fluidTemp("Fluid temperature", CELLS, transportMesh, 1); @@ -80,18 +91,6 @@ int main(int argc, char** argv) myDiffusionEquation.setHeatPowerField(Phi); Phi.writeVTK("1DheatPowerField"); - //Initial field creation - Vector VV_Constant(1); - VV_Constant(0) = 623;//Rod clad temperature nucleaire - - cout << "Construction de la condition initiale " << endl; - // generate initial condition - myDiffusionEquation.setInitialFieldConstant(diffusionMesh,VV_Constant); - - - VV_Constant(0) = 1.3e6; - myTransportEquation.setInitialFieldConstant(transportMesh,VV_Constant); - //set the boundary conditions myTransportEquation.setBoundaryFields(boundaryFieldsTransport);//Neumann and Inlet BC will be used myDiffusionEquation.setBoundaryFields(boundaryFieldsDiffusion);//Only Neumann BC will be used