STLRotationSelfTest.cpp File Reference

Functions

int main (int argc, char *argv[])
 

Function Documentation

◆ main()

int main ( int argc  ,
char argv[] 
)
10 {
11  // Problem setup
13  // Set name of output files
14  problem.setName("STLRotationSelfTest");
15  // Set domain size
16  problem.setMax({450,50,50});
17  problem.setMin({-450,-50,-50});
18  // Set time step, final time and how often to output
19  problem.setTimeStep(0.01);
20  problem.setTimeMax(0.1);
21  problem.setSaveCount(1);
22  // Turn off most output files except data and wall-vtu files
23  problem.fStatFile.setFileType(FileType::NO_FILE);
24  problem.eneFile.setFileType(FileType::NO_FILE);
25  problem.restartFile.setFileType(FileType::NO_FILE);
26  problem.wallHandler.setWriteVTK(true);
27  // Introduce a material (no properties set, as no collisions happen here)
28  problem.speciesHandler.copyAndAddObject(LinearViscoelasticSpecies());
29  // introduce an outer wall
30  problem.wallHandler.readTriangleWall("Casing.stl",problem.speciesHandler.getObject(0));
31  // introduce an inner, rotating wall
32  Mdouble scaleFactor = 1;
33  Vec3D shift = {0,0,0};
34  Vec3D velocity = {0,0,0};
35  Vec3D angularVelocity = {2.0*constants::pi,0,0};
36  problem.wallHandler.readTriangleWall("Screw.stl",problem.speciesHandler.getObject(0),
37  scaleFactor,shift,velocity,angularVelocity);
38  // start solving in time
39  problem.solve();
40  logger.assert_always(problem.wallHandler.getSize()==4316,"Didn't read the right number of walls");
41  logger(INFO,"Load %Wall_*.vtu in paraview to see the wall geometry",problem.getName());
42  return 0;
43 }
@ NO_FILE
file will not be created/read
Species< LinearViscoelasticNormalSpecies > LinearViscoelasticSpecies
Definition: LinearViscoelasticSpecies.h:11
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
This adds on the hierarchical grid code for 3D problems.
Definition: Mercury3D.h:16
Definition: Kernel/Math/Vector.h:30
#define INFO(i)
Definition: mumps_solver.h:54
double velocity(const double &t)
Angular velocity as function of time t.
Definition: jeffery_orbit.cc:107
const Mdouble pi
Definition: ExtendedMath.h:23
Constructor for SteadyAxisymAdvectionDiffusion problem
Definition: steady_axisym_advection_diffusion.cc:213

References INFO, logger, NO_FILE, constants::pi, problem, and Jeffery_Solution::velocity().