]> SALOME platform Git repositories - tools/solverlab.git/commitdiff
Salome HOME
Minor restructuration
authormichael <michael@localhost.localdomain>
Fri, 10 Dec 2021 13:41:49 +0000 (14:41 +0100)
committermichael <michael@localhost.localdomain>
Fri, 10 Dec 2021 13:41:49 +0000 (14:41 +0100)
CoreFlows/examples/C/CoupledTransportDiffusionEquations_1DHeatedChannel.cxx

index a2d878270ec2d290c597ec6f151ce75021f53d01..a5cce6eec71a1a5668cf2aafb86145cf4b23b986 100755 (executable)
@@ -63,10 +63,21 @@ int main(int argc, char** argv)
        double lambda_ur=5;\r
 \r
        TransportEquation  myTransportEquation(LiquidPhase, around155bars600KTransport,transportVelocity);\r
-       Field fluidEnthalpy("Enthalpie", CELLS, transportMesh, 1);\r
+\r
        bool FECalculation=false;\r
     DiffusionEquation  myDiffusionEquation(spaceDim,FECalculation,rho_ur, cp_ur, lambda_ur);\r
 \r
+\r
+       //Set initial field\r
+       cout << "Construction de la condition initiale " << endl;\r
+\r
+       Vector VV_Constant(1);\r
+       VV_Constant(0) = 623;//Rod clad temperature nucleaire\r
+       myDiffusionEquation.setInitialFieldConstant(diffusionMesh,VV_Constant);\r
+\r
+       VV_Constant(0) = 1.3e6;\r
+       myTransportEquation.setInitialFieldConstant(transportMesh,VV_Constant);\r
+\r
        Field solidTemp("Solid temperature", CELLS, diffusionMesh, 1);\r
        Field fluidTemp("Fluid temperature", CELLS, transportMesh, 1);\r
 \r
@@ -80,18 +91,6 @@ int main(int argc, char** argv)
        myDiffusionEquation.setHeatPowerField(Phi);\r
        Phi.writeVTK("1DheatPowerField");\r
 \r
-       //Initial field creation\r
-       Vector VV_Constant(1);\r
-       VV_Constant(0) = 623;//Rod clad temperature nucleaire\r
-\r
-       cout << "Construction de la condition initiale " << endl;\r
-       // generate initial condition\r
-       myDiffusionEquation.setInitialFieldConstant(diffusionMesh,VV_Constant);\r
-\r
-\r
-       VV_Constant(0) = 1.3e6;\r
-       myTransportEquation.setInitialFieldConstant(transportMesh,VV_Constant);\r
-\r
        //set the boundary conditions\r
        myTransportEquation.setBoundaryFields(boundaryFieldsTransport);//Neumann and Inlet BC will be used\r
        myDiffusionEquation.setBoundaryFields(boundaryFieldsDiffusion);//Only Neumann BC will be used\r