HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GAS_Buoyancy.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GAS_Buoyancy.h ( GAS Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GAS_Buoyancy__
12 #define __GAS_Buoyancy__
13 
14 #include "GAS_API.h"
15 
16 #include "GAS_SubSolver.h"
17 #include "GAS_Utils.h"
18 
19 class SIM_VectorField;
20 class SIM_ScalarField;
21 
23 {
24 public:
25  GET_DATA_FUNC_S(GAS_NAME_TEMPERATURE, TemperatureName);
26  GET_DATA_FUNC_S(GAS_NAME_VELOCITY, VelocityName);
27 
28  GETSET_DATA_FUNCS_V3("dir", BuoyancyDir);
29  GETSET_DATA_FUNCS_F("lift", BuoyancyLift);
30  GETSET_DATA_FUNCS_F("ambient", Ambient);
31 
34  GET_DATA_FUNC_B(SIM_NAME_OPENCL, UseOpenCL);
35 
36 protected:
37  explicit GAS_Buoyancy(const SIM_DataFactory *factory);
38  virtual ~GAS_Buoyancy();
39 
40  /// Moves the fields given by FieldName by the given velocity
41  /// field. Moves the points given by GeometryName likewise.
42  virtual bool solveGasSubclass(SIM_Engine &engine,
43  SIM_Object *obj,
44  SIM_Time time,
45  SIM_Time timestep);
46 
47  void addBuoyancyForces(SIM_Object *obj,
48  SIM_VectorField *velocity,
49  const SIM_ScalarField *temperature,
50  fpreal timestep);
51 
52  void addBuoyancyForcesCL(SIM_Object *obj,
53  SIM_VectorField *velocity,
54  const SIM_ScalarField *temperature,
55  const UT_Vector3 &up,
56  fpreal scale,
57  fpreal Tamb);
58 
59 private:
60  static const SIM_DopDescription *getDopDescription();
61 
65  "Gas Buoyancy",
66  getDopDescription());
67 };
68 
69 #endif
70 
#define DECLARE_STANDARD_GETCASTTOTYPE()
Definition: SIM_DataUtils.h:45
#define GAS_NAME_TEMPERATURE
Definition: GAS_Utils.h:39
#define GAS_NAME_USETIMESTEP
Definition: GAS_Utils.h:37
#define GAS_API
Definition: GAS_API.h:10
virtual bool solveGasSubclass(SIM_Engine &engine, SIM_Object *obj, SIM_Time time, SIM_Time timestep)=0
#define GETSET_DATA_FUNCS_F(DataName, FuncName)
#define GETSET_DATA_FUNCS_V3(DataName, FuncName)
#define GAS_NAME_VELOCITY
Definition: GAS_Utils.h:40
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
Definition: SIM_DataUtils.h:58
GA_API const UT_StringHolder scale
double fpreal
Definition: SYS_Types.h:269
GA_API const UT_StringHolder up
#define GET_DATA_FUNC_B(DataName, FuncName)
#define GET_DATA_FUNC_F(DataName, FuncName)
This class holds a three dimensional scalar field.
#define SIM_NAME_OPENCL
Definition: SIM_Names.h:221
#define GAS_NAME_TIMESCALE
Definition: GAS_Utils.h:38
This class holds a three dimensional vector field.
#define GET_DATA_FUNC_S(DataName, FuncName)