00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __GAS_Buoyancy__
00020 #define __GAS_Buoyancy__
00021
00022 #include "GAS_API.h"
00023
00024 #include "GAS_SubSolver.h"
00025 #include "GAS_Utils.h"
00026
00027 class SIM_VectorField;
00028 class SIM_ScalarField;
00029
00030 class GAS_API GAS_Buoyancy : public GAS_SubSolver
00031 {
00032 public:
00033 GET_DATA_FUNC_S(GAS_NAME_TEMPERATURE, TemperatureName);
00034 GET_DATA_FUNC_S(GAS_NAME_VELOCITY, VelocityName);
00035
00036 GETSET_DATA_FUNCS_V3("dir", BuoyancyDir);
00037 GETSET_DATA_FUNCS_F("lift", BuoyancyLift);
00038 GETSET_DATA_FUNCS_F("ambient", Ambient);
00039
00040 GET_DATA_FUNC_B(GAS_NAME_USETIMESTEP, UseTimeStep);
00041 GET_DATA_FUNC_F(GAS_NAME_TIMESCALE, TimeScale);
00042
00043 protected:
00044 explicit GAS_Buoyancy(const SIM_DataFactory *factory);
00045 virtual ~GAS_Buoyancy();
00046
00047
00048
00049 virtual bool solveGasSubclass(SIM_Engine &engine,
00050 SIM_Object *obj,
00051 SIM_Time time,
00052 SIM_Time timestep);
00053
00054 void addBuoyancyForces(SIM_VectorField *velocity,
00055 SIM_ScalarField *temperature,
00056 fpreal timestep);
00057
00058 private:
00059 static const SIM_DopDescription *getDopDescription();
00060
00061 DECLARE_STANDARD_GETCASTTOTYPE();
00062 DECLARE_DATAFACTORY(GAS_Buoyancy,
00063 GAS_SubSolver,
00064 "Gas Buoyancy",
00065 getDopDescription());
00066 };
00067
00068 #endif
00069