6 def TransportEquation_1DHeatedChannel():
14 # set the limit field for each boundary
17 # Set the transport velocity
18 transportVelocity=[5];
20 myProblem = cf.TransportEquation(cf.Water,cf.around155bars600K,transportVelocity);
21 nVar = myProblem.getNumberOfVariables();
23 # Prepare for the initial condition
24 VV_Constant = [1.3e6]; #initial enthalpy
26 #Set rod temperature and heat exchamge coefficient
27 rodTemp=623;#Rod clad temperature
28 heatTransfertCoeff=1000;#fluid/solid heat exchange coefficient
29 myProblem.setRodTemperature(rodTemp);
30 myProblem.setHeatTransfertCoeff(heatTransfertCoeff);
32 #Initial field creation
33 print("Building mesh and initial data " );
34 myProblem.setInitialFieldConstant(spaceDim,VV_Constant,xinf,xsup,nx,"inlet","neumann");
36 # Set the boundary conditions
37 myProblem.setInletBoundaryCondition("inlet", inletEnthalpy);
38 myProblem.setNeumannBoundaryCondition("neumann")
40 # Set the numerical method
41 myProblem.setTimeScheme( cf.Explicit);
44 fileName = "1DFluidEnthalpy";
46 # parameters calculation
53 myProblem.setCFL(cfl);
54 myProblem.setPrecision(precision);
55 myProblem.setMaxNbOfTimeStep(MaxNbOfTimeStep);
56 myProblem.setTimeMax(maxTime);
57 myProblem.setFreqSave(freqSave);
58 myProblem.setFileName(fileName);
62 myProblem.initialize();
66 print( "Simulation python " + fileName + " is successful !" );
69 print( "Simulation python " + fileName + " failed ! " );
72 print( "------------ End of calculation !!! -----------" );
74 myProblem.terminate();
77 if __name__ == """__main__""":
78 TransportEquation_1DHeatedChannel()