]> SALOME platform Git repositories - tools/solverlab.git/commitdiff
Salome HOME
Mesh should be set befor giving input fields
authormichael <michael@localhost.localdomain>
Fri, 10 Dec 2021 13:44:27 +0000 (14:44 +0100)
committermichael <michael@localhost.localdomain>
Fri, 10 Dec 2021 13:44:27 +0000 (14:44 +0100)
CoreFlows/examples/C/TransportEquation_1DHeatedChannel.cxx
CoreFlows/examples/C/TransportEquation_1DHeatedChannel_MPI.cxx

index 2cd886d47b3f7cb9173e3d98dc02f8eda8543365..45d706b769ddbfffc2ba491a4d3d8975120fd70d 100755 (executable)
@@ -32,23 +32,20 @@ int main(int argc, char** argv)
        vector<double> transportVelocity(1,5);//fluid velocity vector\r
 \r
        TransportEquation  myProblem(LiquidPhase,around155bars600KTransport,transportVelocity);\r
-       Field VV("Enthalpy", CELLS, M, 1);\r
 \r
-       //Set rod temperature and heat exchamge coefficient\r
-       double rodTemp=623;//Rod clad temperature\r
-       double heatTransfertCoeff=1000;//fluid/solid exchange coefficient \r
-       myProblem.setRodTemperature(rodTemp);\r
-       myProblem.setHeatTransfertCoeff(heatTransfertCoeff);\r
-\r
-       //Initial field creation\r
+       //Set initial field\r
        Vector VV_Constant(1);//initial enthalpy\r
        VV_Constant(0) = 1.3e6;\r
 \r
        cout << "Building the initial data " << endl;\r
-\r
-       // generate initial condition\r
        myProblem.setInitialFieldConstant(M,VV_Constant);\r
 \r
+       //Set rod temperature and heat exchamge coefficient\r
+       double rodTemp=623;//Rod clad temperature\r
+       double heatTransfertCoeff=1000;//fluid/solid exchange coefficient \r
+       myProblem.setRodTemperature(rodTemp);\r
+       myProblem.setHeatTransfertCoeff(heatTransfertCoeff);\r
+\r
        //set the boundary conditions\r
        myProblem.setBoundaryFields(boundaryFields);\r
 \r
index 2cd886d47b3f7cb9173e3d98dc02f8eda8543365..d97b8580df0cde27e531987c5f9f974c3e5263ca 100755 (executable)
@@ -34,21 +34,20 @@ int main(int argc, char** argv)
        TransportEquation  myProblem(LiquidPhase,around155bars600KTransport,transportVelocity);\r
        Field VV("Enthalpy", CELLS, M, 1);\r
 \r
-       //Set rod temperature and heat exchamge coefficient\r
-       double rodTemp=623;//Rod clad temperature\r
-       double heatTransfertCoeff=1000;//fluid/solid exchange coefficient \r
-       myProblem.setRodTemperature(rodTemp);\r
-       myProblem.setHeatTransfertCoeff(heatTransfertCoeff);\r
 \r
-       //Initial field creation\r
+       //Set initial field\r
        Vector VV_Constant(1);//initial enthalpy\r
        VV_Constant(0) = 1.3e6;\r
 \r
        cout << "Building the initial data " << endl;\r
-\r
-       // generate initial condition\r
        myProblem.setInitialFieldConstant(M,VV_Constant);\r
 \r
+       //Set rod temperature and heat exchamge coefficient\r
+       double rodTemp=623;//Rod clad temperature\r
+       double heatTransfertCoeff=1000;//fluid/solid exchange coefficient \r
+       myProblem.setRodTemperature(rodTemp);\r
+       myProblem.setHeatTransfertCoeff(heatTransfertCoeff);\r
+\r
        //set the boundary conditions\r
        myProblem.setBoundaryFields(boundaryFields);\r
 \r