Thanks to visit codestin.com
Credit goes to mps-basic.github.io

MPS-Basic
Loading...
Searching...
No Matches
settings.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "common.hpp"
4#include "domain.hpp"
5
6#include <Eigen/Dense>
7#include <filesystem>
8
15struct Settings {
16 // computational condition
17 int dim{};
19 double dt{};
20 double endTime{};
21 double outputPeriod{};
22 double cflCondition{};
24
26
27 // physical properties
29 double defaultDensity{};
30
31 // gravity
33 Eigen::Vector3d gravity;
34 double gNorm;
35 double gAngle;
36
37 // free surface detection
38 // surface detection based on number density
40 // surface detection based on particle distribution
43
44 // pressure calculation method
46 // for Implicit
47 double compressibility{};
49 // for Explicit
50 double soundSpeed{};
51
52 // collision
55
56 // effective radius
58 double re_forGradient{};
59 double re_forLaplacian{};
60 double reMax{};
61
62 // i/o
63 std::filesystem::path particlesPath;
65};
represents the domain of the simulation
Definition domain.hpp:8
Struct for settings of calculation.
Definition settings.hpp:15
Eigen::Vector3d gravity
Gravity vector when using xyz input.
Definition settings.hpp:33
double reMax
Maximum of effective radius.
Definition settings.hpp:60
double outputPeriod
Output period of the simulation.
Definition settings.hpp:21
double soundSpeed
Speed of sound for Explicit method.
Definition settings.hpp:50
double compressibility
Compressibility of the fluid for Implicit method.
Definition settings.hpp:47
double collisionDistance
Distance for collision detection.
Definition settings.hpp:53
int numPhysicalCores
Number of cores to calculate.
Definition settings.hpp:23
double particleDistance
Initial distance between particles.
Definition settings.hpp:18
std::filesystem::path particlesPath
Path for input particle file.
Definition settings.hpp:63
bool outputVtkInBinary
Flag for saving VTK file in binary format.
Definition settings.hpp:64
double endTime
End time of the simulation.
Definition settings.hpp:20
int dim
Dimension of the simulation.
Definition settings.hpp:17
double relaxationCoefficientForPressure
Relaxation coefficient for pressure for Implicit method.
Definition settings.hpp:48
double re_forNumberDensity
Effective radius for number density.
Definition settings.hpp:57
double gNorm
Norm of gravity when using norm and angle.
Definition settings.hpp:34
bool surfaceDetection_particleDistribution
flag for free surface detection based on particle distribution
Definition settings.hpp:41
double gAngle
Angle of gravity when using norm and angle.
Definition settings.hpp:35
double defaultDensity
default density for fluid and wall particles.
Definition settings.hpp:29
std::string pressureCalculationMethod
Method for pressure calculation.
Definition settings.hpp:45
double surfaceDetection_particleDistribution_threshold
Definition settings.hpp:42
double kinematicViscosity
Kinematic viscosity.
Definition settings.hpp:28
double cflCondition
CFL condition.
Definition settings.hpp:22
double coefficientOfRestitution
Coefficient of restitution.
Definition settings.hpp:54
double surfaceDetection_numberDensity_threshold
threshold ratio of number density for free surface detection
Definition settings.hpp:39
bool xyzInput
Definition settings.hpp:32
double re_forGradient
Effective radius for gradient.
Definition settings.hpp:58
double dt
Time step.
Definition settings.hpp:19
Domain domain
domain of the simulation
Definition settings.hpp:25
double re_forLaplacian
Effective radius for Laplacian.
Definition settings.hpp:59