1 #include "IsothermalTwoFluid.hxx"
5 int main(int argc, char** argv)
7 cout << "Building Cartesian mesh " << endl;
13 vector<double> wallVelocityX(2,0);
16 vector<double> gravite(spaceDim,0.) ;
19 IsothermalTwoFluid myProblem(around1bar300K,spaceDim);
20 int nVar = myProblem.getNumberOfVariables();
22 // Prepare for the initial condition
23 vector<double> VV_Constant(nVar,0.);
30 //Initial field creation
31 cout << "Building initial data " << endl;
32 myProblem.setInitialFieldConstant(spaceDim,VV_Constant,xinf,xsup,nx,"wall","wall");
33 myProblem.setWallBoundaryCondition("wall",wallVelocityX);
36 // physical parameters
37 myProblem.setGravity(gravite);
39 // set the numerical method
40 myProblem.setNumericalScheme(upwind, Implicit);
41 myProblem.setEntropicCorrection(true);
44 string fileName = "1DSedimentation";
46 // parameters calculation
47 unsigned MaxNbOfTimeStep = 3;
51 double precision = 1e-6;
53 myProblem.setCFL(cfl);
54 myProblem.setPrecision(precision);
55 myProblem.setMaxNbOfTimeStep(MaxNbOfTimeStep);
56 myProblem.setTimeMax(maxTime);
57 myProblem.setFreqSave(freqSave);
58 myProblem.setFileName(fileName);
59 myProblem.displayConditionNumber();
60 myProblem.setSaveFileFormat(CSV);
63 myProblem.initialize();
65 bool ok = myProblem.run();
67 cout << "Simulation "<<fileName<<" is successful !" << endl;
69 cout << "Simulation "<<fileName<<" failed ! " << endl;
71 cout << "------------ End of simulation !!! -----------" << endl;
72 myProblem.terminate();