Go to the documentation of this file.
7 #ifndef INCLUDE_JET_GRID_SMOKE_SOLVER2_H_
8 #define INCLUDE_JET_GRID_SMOKE_SOLVER2_H_
168 size_t _smokeDensityDataId;
169 size_t _temperatureDataId;
170 double _smokeDiffusionCoefficient = 0.0;
171 double _temperatureDiffusionCoefficient = 0.0;
172 double _buoyancySmokeDensityFactor = -0.000625;
173 double _buoyancyTemperatureFactor = 5.0;
174 double _smokeDecayFactor = 0.001;
175 double _temperatureDecayFactor = 0.001;
177 void computeDiffusion(
double timeIntervalInSeconds);
179 void computeBuoyancyForce(
double timeIntervalInSeconds);
201 #endif // INCLUDE_JET_GRID_SMOKE_SOLVER2_H_
void setSmokeDecayFactor(double newValue)
Sets the smoke decay factor.
Vector2D gridSpacing() const
Returns the grid spacing of the grid system data.
double temperatureDiffusionCoefficient() const
Returns temperature diffusion coefficient.
double smokeDecayFactor() const
Returns smoke decay factor.
Vector2D gridOrigin() const
Returns the origin of the grid system data.
virtual ~GridSmokeSolver2()
Destructor.
Abstract base class for grid-based 2-D fluid solver.
Definition: grid_fluid_solver2.h:34
ScalarGrid2Ptr temperature() const
Returns temperature field.
void setSmokeDiffusionCoefficient(double newValue)
Sets smoke diffusion coefficient.
double buoyancySmokeDensityFactor() const
Returns the buoyancy factor which will be multiplied to the smoke density.
Definition: advection_solver2.h:18
double smokeDiffusionCoefficient() const
Returns smoke diffusion coefficient.
std::shared_ptr< GridSmokeSolver2 > GridSmokeSolver2Ptr
Shared pointer type for the GridSmokeSolver2.
Definition: grid_smoke_solver2.h:183
2-D vector class.
Definition: vector2.h:24
void setBuoyancySmokeDensityFactor(double newValue)
Sets the buoyancy factor which will be multiplied to the smoke density.
GridSmokeSolver2Ptr makeShared() const
Builds shared pointer of GridSmokeSolver2 instance.
std::shared_ptr< ScalarGrid2 > ScalarGrid2Ptr
Shared pointer for the ScalarGrid2 type.
Definition: scalar_grid2.h:188
2-D size class.
Definition: size2.h:19
ScalarGrid2Ptr smokeDensity() const
Returns smoke density field.
double buoyancyTemperatureFactor() const
Returns the buoyancy factor which will be multiplied to the temperature.
void computeExternalForces(double timeIntervalInSeconds) override
Computes the external force terms.
2-D grid-based smoke solver.
Definition: grid_smoke_solver2.h:25
void onEndAdvanceTimeStep(double timeIntervalInSeconds) override
Called at the end of a time-step.
void setTemperatureDecayFactor(double newValue)
Sets the temperature decay factor.
Front-end to create GridSmokeSolver2 objects step by step.
Definition: grid_smoke_solver2.h:190
static Builder builder()
Returns builder fox GridSmokeSolver2.
GridSmokeSolver2(const Size2 &resolution, const Vector2D &gridSpacing, const Vector2D &gridOrigin)
Constructs solver with initial grid size.
GridSmokeSolver2()
Default constructor.
GridSmokeSolver2 build() const
Builds GridSmokeSolver2.
void setBuoyancyTemperatureFactor(double newValue)
Sets the buoyancy factor which will be multiplied to the temperature.
Size2 resolution() const
Returns the resolution of the grid system data.
Base class for grid-based fluid solver builder.
Definition: grid_fluid_solver2.h:300
double smokeTemperatureDecayFactor() const
Returns temperature decay factor.
void setTemperatureDiffusionCoefficient(double newValue)
Sets temperature diffusion coefficient.