File: particulatecommon.h

package info (click to toggle)
gerris 20131206%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 12,728 kB
  • ctags: 6,777
  • sloc: ansic: 66,593; sh: 15,930; f90: 1,513; makefile: 1,180; fortran: 696; python: 484; awk: 104; lisp: 89; xml: 27
file content (186 lines) | stat: -rw-r--r-- 5,468 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
/* Gerris - The GNU Flow Solver
 * Copyright (C) 2009-2012 National Institute of Water and Atmospheric Research
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 * 02111-1307, USA.  
 */

#include "particle.h"

/* GfsParticulate: Header */

typedef struct _GfsParticulate GfsParticulate;

struct _GfsParticulate {
  GfsParticle parent;
  FttVector vel;
  gdouble mass, volume;
  FttVector force;
  GtsSListContainer * forces;
};

#define GFS_PARTICULATE(obj)            GTS_OBJECT_CAST (obj,		\
							 GfsParticulate, gfs_particulate_class ())
#define GFS_IS_PARTICULATE(obj)         (gts_object_is_from_class (obj, gfs_particulate_class ()))

GfsEventClass * gfs_particulate_class  (void);

/* GfsParticleList: Header */

typedef struct _GfsParticleList GfsParticleList;

struct _GfsParticleList {
  GfsEventList parent;
  gint idlast;
  GtsSListContainer * forces;
};

#define GFS_PARTICLE_LIST(obj)            GTS_OBJECT_CAST (obj,		\
							   GfsParticleList, \
							   gfs_particle_list_class ())

#define GFS_IS_PARTICLE_LIST(obj)         (gts_object_is_from_class (obj, \
								     gfs_particle_list_class ()))

GfsEventClass * gfs_particle_list_class  (void);

/* GfsParticleForce: header */

typedef struct _GfsParticleForce GfsParticleForce;

struct _GfsParticleForce{
  GtsSListContainee parent;
  FttVector (* force) (GfsParticle *p, GfsParticleForce *force);
};

#define GFS_PARTICLE_FORCE(obj)            GTS_OBJECT_CAST (obj,		\
							GfsParticleForce, \
							gfs_particle_force_class ())
#define GFS_IS_PARTICLE_FORCE(obj)         (gts_object_is_from_class (obj, \
								      gfs_particle_force_class ()))

GtsSListContaineeClass * gfs_particle_force_class  (void);

/* GfsForceCoeff: header */

typedef struct _GfsForceCoeff GfsForceCoeff;

struct _GfsForceCoeff{
  GfsParticleForce parent;
  GfsFunction * coefficient;
  GfsVariable *re_p, *u_rel, *v_rel, *w_rel, *pdia;
  GfsParticulate *p;
};

#define FORCE_COEFF(obj)            GTS_OBJECT_CAST (obj,		\
						    GfsForceCoeff,		\
						    gfs_force_coeff_class ())
#define GFS_IS_FORCE_COEFF(obj)         (gts_object_is_from_class (obj,	\
								  gfs_force_coeff_class ()))
GtsSListContaineeClass * gfs_force_coeff_class  (void);

/* GfsForceLift: header */

#define GFS_IS_FORCE_LIFT(obj)         (gts_object_is_from_class (obj,	\
								  gfs_force_lift_class ()))
GtsSListContaineeClass * gfs_force_lift_class  (void);

/* GfsForceDrag: header */

#define GFS_IS_FORCE_DRAG(obj)         (gts_object_is_from_class (obj,	\
								  gfs_force_drag_class ()))
GtsSListContaineeClass * gfs_force_drag_class  (void);

/* GfsForceBuoy: header */

#define GFS_IS_FORCE_BUOY(obj)         (gts_object_is_from_class (obj,	\
								  gfs_force_buoy_class ()))
GtsSListContaineeClass * gfs_force_buoy_class  (void);

/* GfsDropletToParticle: header */

typedef struct _GfsDropletToParticle GfsDropletToParticle;

struct _GfsDropletToParticle{
  /*< private >*/
  GfsParticleList parent;
  GfsVariable * v;
  
  /*< public >*/
  GfsFunction * fc;
  GfsVariable * c;
  gint min;
  gdouble resetwith;
  gdouble density;
};

#define DROPLET_TO_PARTICLE(obj)            GTS_OBJECT_CAST (obj,\
					         GfsDropletToParticle,\
					         gfs_droplet_to_particle_class ())

#define IS_DROPLET_TO_PARTICLE(obj)         (gts_object_is_from_class (obj,\
						 gfs_droplet_to_particle_class ()))

GfsEventClass * gfs_droplet_to_particle_class  (void);

/* GfsParticulateField: header */

typedef struct _GfsParticulateField                GfsParticulateField;

struct _GfsParticulateField {
  /*< private >*/
  GfsVariable parent;

  /*< public >*/
  GfsParticleList * plist;
  void (* voidfraction_func) (FttCell *, 
			      GfsVariable *, 
			      GfsParticulate *);
};
 

#define GFS_PARTICULATE_FIELD(obj)            GTS_OBJECT_CAST (obj,\
                                                   GfsParticulateField,\
                                                   gfs_particulate_field_class ())
#define GFS_IS_PARTICULATE_FIELD(obj)         (gts_object_is_from_class (obj,\
                                                   gfs_particulate_field_class ()))

GfsVariableClass * gfs_particulate_field_class  (void);

/* GfsFeedParticle: header */

typedef struct _GfsFeedParticle GfsFeedParticle;

struct _GfsFeedParticle{
  /*< private >*/
  GfsParticleList parent;
  GfsVariable * v;
  
  /*< public >*/
  GfsFunction * posx, * posy, * posz;
  GfsFunction * velx, * vely, * velz;
  GfsFunction * np,   * mass, * vol;
};

#define GFS_FEED_PARTICLE(obj)            GTS_OBJECT_CAST (obj,\
					         GfsFeedParticle,\
					         gfs_feed_particle_class ())

#define GFS_IS_FEED_PARTICLE(obj)         (gts_object_is_from_class (obj,\
					         gfs_feed_particle_class ()))

GfsEventClass * gfs_feed_particle_class  (void);