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
32 Eigen::Vector3d gravity;
33
34 // free surface detection
35 // surface detection based on number density
37 // surface detection based on particle distribution
40
41 // pressure calculation method
43 // for Implicit
44 double compressibility{};
46 // for Explicit
47 double soundSpeed{};
48
49 // collision
52
53 // effective radius
55 double re_forGradient{};
56 double re_forLaplacian{};
57 double reMax{};
58
59 // i/o
60 std::filesystem::path particlesPath;
62};
represents the domain of the simulation
Definition domain.hpp:8
Struct for settings of calculation.
Definition settings.hpp:15
Eigen::Vector3d gravity
Gravity.
Definition settings.hpp:32
double reMax
Maximum of effective radius.
Definition settings.hpp:57
double outputPeriod
Output period of the simulation.
Definition settings.hpp:21
double soundSpeed
Speed of sound for Explicit method.
Definition settings.hpp:47
double compressibility
Compressibility of the fluid for Implicit method.
Definition settings.hpp:44
double collisionDistance
Distance for collision detection.
Definition settings.hpp:50
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:60
bool outputVtkInBinary
Flag for saving VTK file in binary format.
Definition settings.hpp:61
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:45
double re_forNumberDensity
Effective radius for number density.
Definition settings.hpp:54
bool surfaceDetection_particleDistribution
flag for free surface detection based on particle distribution
Definition settings.hpp:38
double defaultDensity
default density for fluid and wall particles.
Definition settings.hpp:29
std::string pressureCalculationMethod
Method for pressure calculation.
Definition settings.hpp:42
double surfaceDetection_particleDistribution_threshold
Definition settings.hpp:39
double kinematicViscosity
Kinematic viscosity.
Definition settings.hpp:28
double cflCondition
CFL condition.
Definition settings.hpp:22
double coefficientOfRestitution
Coefficient of restitution.
Definition settings.hpp:51
double surfaceDetection_numberDensity_threshold
threshold ratio of number density for free surface detection
Definition settings.hpp:36
double re_forGradient
Effective radius for gradient.
Definition settings.hpp:55
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:56