Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
transfer_actions.h
Go to the documentation of this file.
1 /* *******************************************************************
2  * Rocstar Simulation Suite *
3  * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4  * *
5  * Illinois Rocstar LLC *
6  * Champaign, IL *
7  * www.illinoisrocstar.com *
8  * sales@illinoisrocstar.com *
9  * *
10  * License: See LICENSE file in top level of distribution package or *
11  * http://opensource.org/licenses/NCSA *
12  *********************************************************************/
13 /* *******************************************************************
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17  * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21  * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22  *********************************************************************/
23 // $Id: transfer_actions.h,v 1.23 2008/12/06 08:45:22 mtcampbe Exp $
24 
25 #ifndef _TRANSFER_ACTIONS_H_
26 #define _TRANSFER_ACTIONS_H_
27 
28 #include "rocman.h"
29 
30 class FluidAgent;
31 class SolidAgent;
32 class BurnAgent;
33 
34 // base class for mesh transfer
35 class InterMeshTransfer : public Action {
36  public:
37  explicit InterMeshTransfer( FluidAgent *fag, SolidAgent *sag, char *name=NULL);
38  protected:
39  void load_rocface(const RocmanControl_parameters *param);
42 };
43 
44 // Fluid => Solid (pressure)
46  public:
47  explicit LoadTransfer_FS( FluidAgent *fag, SolidAgent *sag, const std::string f_ts, const std::string s_ts, const std::string s_pf);
48  void init(double t);
49  void run(double t, double dt, double alpha);
50  private:
52  int size_ts;
53  std::string f_ts_str, s_ts_str, s_pf_str;
55  int f_pf_hdl;
58 };
59 
60 // Fluid => Solid (pressure) with Burn
62  public:
63  explicit LoadTransfer_FSc_ALE( FluidAgent *fag, SolidAgent *sag, BurnAgent *bag, const std::string f_pf, const std::string fb_mdot, const std::string b_rb, const std::string s_ts, const std::string s_pf);
64  void init(double t);
65  void run(double t, double dt, double alpha);
66  private:
68  int size_ts;
76 };
77 
78 // Fluid => Solid (pressure) with Burn : part 2 only
80  public:
81  explicit LoadTransferOnly_FSc_ALE( FluidAgent *fag, SolidAgent *sag, BurnAgent *bag, const std::string f_ts, const std::string s_ts, const std::string s_pf);
82  void init(double t);
83  void run(double t, double dt, double alpha);
84  private:
86  int size_ts;
91 };
92 
93 // Solid => Fluid
94 // POST_UPDATE_SOLID solid_agent.f90
96 public:
97  explicit GetDeformedMesh( FluidAgent *fag, SolidAgent *sag, const std::string s_x, const std::string uhat, const std::string s_y);
98  void init(double t);
99  void run(double t, double dt, double alpha);
100 private:
101  std::string s_x_str, s_uhat_str, s_y_str;
103 };
104 
105 // Solid => Fluid
106 // POST_UPDATE_SOLID solid_agent.f90
108 public:
109  explicit GetDeformedMesh_ALE( FluidAgent *fag, SolidAgent *sag, const std::string s_x, const std::string uhat, const std::string s_y, double z);
110  void init(double t);
111  void run(double t, double dt, double alpha);
112 private:
113  std::string s_x_str, s_uhat_str, s_y_str;
116  int withALE;
117  double zoom;
119 };
120 
121 // Solid => Fluid
122 // INIT_INBUFF_FLUID fluid_agent.f90
124 public:
125  explicit MeshMotionTransfer_SF( FluidAgent *fag, SolidAgent *sag, const std::string s_u, const std::string f_total_disp, const std::string f_vm);
126  void init(double t);
127  void run(double t, double dt, double alpha);
128 private:
132 };
133 
134 // Solid => Fluid
135 // INIT_INBUFF_FLUID fluid_agent.f90
137 public:
138  explicit DeformationVelTransfer_SF( FluidAgent *fag, SolidAgent *sag, const std::string s_vs, const std::string f_vs); // fluid agent
139  void init(double t);
140  void run(double t, double dt, double alpha);
141 private:
142  std::string s_vs_str, f_vs_str;
145 };
146 
147 // Solid => Fluid
149 public:
150  explicit MeshMotionTransferISS( FluidAgent *fag, SolidAgent *sag, const std::string s_u, const std::string s_vs, const std::string f_vm); // fluid agent
151  void init(double t);
152  void run(double t, double dt, double alpha);
153 private:
154  std::string s_u_str, s_vs_str, f_vm_str;
159 };
160 
161 // Burn
162 // INIT_INBUFF_FLUID fluid_agent.f90
164 public:
165  explicit TransferSolidDensity( FluidAgent *fag, SolidAgent *sag, const std::string s_rhos, const std::string f_rhos);
166  void init(double t);
167  void run(double t, double dt, double alpha);
168 private:
169  std::string s_rhos_str, f_rhos_str;
172 };
173 
174 // Burn
175 // INIT_INBUFF_FLUID fluid_agent.f90
177 public:
178  explicit TransferBurnRate_FS_ALE( FluidAgent *fag, SolidAgent *sag, const std::string b_rb, const std::string s_rb);
179  void init(double t);
180  void run(double t, double dt, double alpha);
181 private:
182  std::string b_rb_str, s_rb_str;
185 };
186 
188  public:
189  MassTransfer_SF_ALE(FluidAgent *ag, SolidAgent *sag, BurnAgent *bag, const std::string f_mdot);
190  void init(double t);
191  void run(double t, double dt, double alpha);
192  private:
197 };
198 
200  public:
201  TemperatureTransfer_SF(SolidAgent *sag, FluidAgent *ag, const std::string s_Tf, const std::string fb_Tflm_alp, const std::string fn_Tb);
202  void init(double t);
203  void run(double t, double dt, double alpha);
204  private:
206  int f_Ts_hdl, bcflag_hdl; // temporary
209 };
210 
212  public:
213  HeatTransfer_FS(FluidAgent *ag, SolidAgent *sag, BurnAgent *bag, const std::string f_qc, const std::string f_qr, const std::string fb_qev, const std::string s_qs);
214  void init(double t);
215  void run(double t, double dt, double alpha);
216  private:
222 };
223 
225 public:
226  explicit RemeshInit( FluidAgent *fag, SolidAgent *sag, const std::string s_u, const std::string f_total_disp, const std::string f_nc, const std::string f_nc_t0);
227  void init(double t);
228  void run(double t, double dt, double alpha);
229 private:
233 };
234 
235 #define DECLARE_NEW_ACTION( ActionName) \
236  class ActionName : public InterMeshTransfer { \
237  public: \
238  explicit ActionName( FluidAgent *fag, SolidAgent *sag, const char *at[], int *is=NULL, void *p=NULL); \
239  void init(double t); \
240  void run(double t, double dt, double alpha); \
241  };
242 
243 // This action set the attribute to 0s.
244 DECLARE_NEW_ACTION( LoadTransfer_SF);
245 
246 #endif
247 
248 
249 
250 
251 
252 
void run(double t, double dt, double alpha)
void run(double t, double dt, double alpha)
virtual char * name()
Definition: Action.h:53
void init(double t)
TransferSolidDensity(FluidAgent *fag, SolidAgent *sag, const std::string s_rhos, const std::string f_rhos)
TemperatureTransfer_SF(SolidAgent *sag, FluidAgent *ag, const std::string s_Tf, const std::string fb_Tflm_alp, const std::string fn_Tb)
SolidAgent * sagent
void load_rocface(const RocmanControl_parameters *param)
void run(double t, double dt, double alpha)
std::string f_ts_str
LoadTransfer_FSc_ALE(FluidAgent *fag, SolidAgent *sag, BurnAgent *bag, const std::string f_pf, const std::string fb_mdot, const std::string b_rb, const std::string s_ts, const std::string s_pf)
void run(double t, double dt, double alpha)
FluidAgent * fagent
MeshMotionTransfer_SF(FluidAgent *fag, SolidAgent *sag, const std::string s_u, const std::string f_total_disp, const std::string f_vm)
std::string s_y_str
void run(double t, double dt, double alpha)
Definition: Action.h:32
GetDeformedMesh_ALE(FluidAgent *fag, SolidAgent *sag, const std::string s_x, const std::string uhat, const std::string s_y, double z)
std::string s_x_str
HeatTransfer_FS(FluidAgent *ag, SolidAgent *sag, BurnAgent *bag, const std::string f_qc, const std::string f_qr, const std::string fb_qev, const std::string s_qs)
void run(double t, double dt, double alpha)
MassTransfer_SF_ALE(FluidAgent *ag, SolidAgent *sag, BurnAgent *bag, const std::string f_mdot)
DeformationVelTransfer_SF(FluidAgent *fag, SolidAgent *sag, const std::string s_vs, const std::string f_vs)
void init(double t)
void int int int REAL REAL REAL * z
Definition: write.cpp:76
RemeshInit(FluidAgent *fag, SolidAgent *sag, const std::string s_u, const std::string f_total_disp, const std::string f_nc, const std::string f_nc_t0)
TransferBurnRate_FS_ALE(FluidAgent *fag, SolidAgent *sag, const std::string b_rb, const std::string s_rb)
LoadTransfer_FS(FluidAgent *fag, SolidAgent *sag, const std::string f_ts, const std::string s_ts, const std::string s_pf)
#define DECLARE_NEW_ACTION(ActionName)
void run(double t, double dt, double alpha)
void run(double t, double dt, double alpha)
void run(double t, double dt, double alpha)
void init(double t)
InterMeshTransfer(FluidAgent *fag, SolidAgent *sag, char *name=NULL)
void run(double t, double dt, double alpha)
std::string s_pf_str
std::string s_uhat_str
void run(double t, double dt, double alpha)
MeshMotionTransferISS(FluidAgent *fag, SolidAgent *sag, const std::string s_u, const std::string s_vs, const std::string f_vm)
void init(double t)
void run(double t, double dt, double alpha)
BurnAgent * bagent
GetDeformedMesh(FluidAgent *fag, SolidAgent *sag, const std::string s_x, const std::string uhat, const std::string s_y)
std::string s_ts_str
void run(double t, double dt, double alpha)
LoadTransferOnly_FSc_ALE(FluidAgent *fag, SolidAgent *sag, BurnAgent *bag, const std::string f_ts, const std::string s_ts, const std::string s_pf)
void run(double t, double dt, double alpha)