Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ComputeFluidLoad_ALE Class Reference

#include <basic_actions.h>

Inheritance diagram for ComputeFluidLoad_ALE:
Collaboration diagram for ComputeFluidLoad_ALE:

Public Member Functions

 ComputeFluidLoad_ALE (FluidAgent *fag, SolidAgent *sag, const std::string f_pf, const std::string fb_mdot, const std::string b_rb, const std::string f_ts)
 
void init (double t)
 
void run (double t, double dt, double alpha)
 
- Public Member Functions inherited from Action
 Action (void *p=0, char *name=NULL)
 
 Action (int n, const char *at[], int *i=NULL, void *p=0, char *name=NULL)
 
 Action (int n, const std::string at[], int *i=NULL, void *p=0, char *name=NULL)
 
virtual ~Action ()
 
virtual void declare (Scheduler &)
 
virtual void finalize ()
 
virtual char * name ()
 
void set_name (const char *name)
 
virtual void print (FILE *f)
 
virtual void print_toposort (FILE *f)
 
virtual void schedule ()
 

Private Attributes

int traction_mode
 
FluidAgentfagent
 
SolidAgentsagent
 
int f_pf_hdl
 
int f_tf_hdl
 
int f_ts_hdl
 
int fb_ts_hdl
 
int fb_pf_hdl
 
int fb_mdot_hdl
 
int fb_rhof_alp_hdl
 
int fb_mdot_tmp_hdl
 
int b_rb_hdl
 
int fb_nf_alp_hdl
 
int fb_tf_hdl
 

Additional Inherited Members

- Protected Types inherited from Action
enum  { IN =1, OUT =2, INOUT =3 }
 
- Protected Member Functions inherited from Action
int get_attribute_handle (int i)
 
int get_attribute_handle_const (int i)
 
int get_attribute_handle (const std::string str)
 
void set_attr (int n, const std::string at[], int *id=NULL)
 
void set_attr (int n, const char *at[], int *id=NULL)
 
void set_io (int n, const int *io)
 
void set_io (const char *io)
 
int get_io (int i)
 
- Protected Attributes inherited from Action
char * action_name
 
char ** attr
 
int * idx
 
int count
 
void * usr_ptr
 
std::vector< int > inout
 

Detailed Description

Definition at line 132 of file basic_actions.h.

Constructor & Destructor Documentation

ComputeFluidLoad_ALE ( FluidAgent fag,
SolidAgent sag,
const std::string  f_pf,
const std::string  fb_mdot,
const std::string  b_rb,
const std::string  f_ts 
)
explicit

Definition at line 181 of file basic_actions.C.

References COM_DOUBLE, fagent, Agent::get_coupling(), Coupling::get_rocmancontrol_param(), Agent::get_surface_window(), FluidAgent::ifluid_i, Action::IN, NO_SHEER, Action::OUT, Agent::register_clone_attribute(), Agent::register_new_attribute(), sagent, Action::set_attr(), Action::set_io(), SolidAgent::solidBufBase, RocmanControl_parameters::traction_mode, and traction_mode.

184  :
185  Action(0, (const char**)NULL, NULL, NULL, (char *)"ComputeFluidLoad_ALE"),
186  fagent(fag), sagent(sag)
187 {
188  int io[] = {IN, IN, IN, OUT};
189  set_io( 4, io);
190 
191  std::string atts[4];
192  atts[0] = f_pf;
193  atts[1] = fb_mdot;
194  atts[2] = b_rb;
195  atts[3] = f_ts;
196  set_attr(4, atts);
197 
199 
200  // create_attribute
201  // for SolidAgent ??????????????????
202 // if (traction_mode == NO_SHEER && size_ts == 3) {
203  sagent->register_new_attribute( sagent->solidBufBase, ".pf", 'e', COM_DOUBLE, 1, "Pa");
204 // }
205 
206  // for FluidAgent
207  if (traction_mode == NO_SHEER) {
209  }
210  else
212 }
void register_clone_attribute(int cond, std::string target_window_, std::string attr_, std::string parent_window_, std::string parent_attr_, int wg_=1, const char *ptnname_=0, int val_=0)
Definition: Agent.C:328
void register_new_attribute(std::string target_window_, std::string attr_, char loc_, int type_, int ncomp_, const char *unit_)
Definition: Agent.C:322
std::string get_surface_window() const
Definition: Agent.h:217
std::string ifluid_i
Definition: FluidAgent.h:70
std::string solidBufBase
Definition: SolidAgent.h:67
Coupling * get_coupling()
Definition: Agent.h:213
void set_io(int n, const int *io)
Definition: Action.h:70
const int NO_SHEER
Definition: SolidAgent.h:31
Action(void *p=0, char *name=NULL)
Definition: Action.C:32
void set_attr(int n, const std::string at[], int *id=NULL)
Definition: Action.C:66
const RocmanControl_parameters * get_rocmancontrol_param()
Definition: Coupling.h:184

Here is the call graph for this function:

Member Function Documentation

void init ( double  t)
virtual

Reimplemented from Action.

Definition at line 215 of file basic_actions.C.

References b_rb_hdl, COM_get_attribute_handle(), COM_get_attribute_handle_const(), f_pf_hdl, f_tf_hdl, f_ts_hdl, fagent, fb_mdot_hdl, fb_mdot_tmp_hdl, fb_nf_alp_hdl, fb_pf_hdl, fb_rhof_alp_hdl, fb_tf_hdl, fb_ts_hdl, FluidAgent::fluidBufB, FluidAgent::fluidBufNG, Action::get_attribute_handle(), Action::get_attribute_handle_const(), MAN_DEBUG, NO_SHEER, and traction_mode.

216 {
217  if (traction_mode == NO_SHEER) {
220  }
221  else {
222  f_pf_hdl = -1;
223  fb_pf_hdl = -1;
224  }
228 
229  if (traction_mode != NO_SHEER) {
233  }
234  else {
235  f_tf_hdl = -1;
236  fb_tf_hdl = -1;
237  fb_nf_alp_hdl = -1;
238  }
242 
243  MAN_DEBUG(3, ("ComputeFluidLoad_ALE::init() called - traction_mode: %d .\n", traction_mode));
244 }
std::string fluidBufB
Definition: FluidAgent.h:80
int get_attribute_handle(int i)
Definition: Action.C:93
int COM_get_attribute_handle(const char *waname)
Definition: roccom_c++.h:412
int get_attribute_handle_const(int i)
Definition: Action.C:110
std::string fluidBufNG
Definition: FluidAgent.h:78
const int NO_SHEER
Definition: SolidAgent.h:31
int COM_get_attribute_handle_const(const char *waname)
Definition: roccom_c++.h:420
#define MAN_DEBUG(l, x)
Definition: rocman.h:98

Here is the call graph for this function:

void run ( double  t,
double  dt,
double  alpha 
)
virtual

Reimplemented from Action.

Definition at line 246 of file basic_actions.C.

References b_rb_hdl, COM_call_function(), RocBlas::copy, RocBlas::div, f_pf_hdl, f_tf_hdl, f_ts_hdl, fagent, fb_mdot_hdl, fb_mdot_tmp_hdl, fb_nf_alp_hdl, fb_pf_hdl, fb_rhof_alp_hdl, fb_tf_hdl, fb_ts_hdl, Agent::get_coupling(), Coupling::get_rocmancontrol_param(), MAN_DEBUG, RocBlas::mul, NO_SHEER, RocmanControl_parameters::P_ambient, sagent, RocBlas::sub, RocBlas::sub_scalar, traction_mode, and SolidAgent::withALE.

246  {
247  MAN_DEBUG(3, ("Rocstar: ComputeFluidLoad_ALE::run() with t:%e dt:%e.\n", t, dt));
248  // ts = tf + ( mdot*Vs
249 
250  // part 1 (POST_UPDATE_FLUID in fluid_agent.f90)
251  if (traction_mode != NO_SHEER) {
253 
254  // Compute tfmts = t_s-t_f (see developers guide).
255  // Here fb_mdot_tmp is used as buffer space.
257 
258  if ( sagent->withALE) {
260  }
261 
264 
265  // Compute ts = tf - (tf-ts)
267  }
268  else { // ts is a scalar
269 
271 
272  // Compute tsmpf = p_f-t_s (see developers guide).
273  // Here fb_mdot_tmp is used as buffer space.
275 
276  if ( sagent->withALE) {
278  }
279 
281 
282  // Compute ts = pf - (pf-ts)
284 
285  // Subtract from P_ambient if not zeros
286  double P_ambient = fagent->get_coupling()->get_rocmancontrol_param()->P_ambient;
287  if ( P_ambient != 0.0) {
289  }
290  }
291 
292  // debug_print(fagent->fluidBufNG+".ts", 102, 0, "LOAD");
293 }
int withALE
Definition: SolidAgent.h:84
static int copy
Definition: RocBlas.h:34
static int div
Definition: RocBlas.h:39
Coupling * get_coupling()
Definition: Agent.h:213
static int sub_scalar
Definition: RocBlas.h:44
void COM_call_function(const int wf, int argc,...)
Definition: roccom_c.C:48
const int NO_SHEER
Definition: SolidAgent.h:31
#define MAN_DEBUG(l, x)
Definition: rocman.h:98
const RocmanControl_parameters * get_rocmancontrol_param()
Definition: Coupling.h:184
static int sub
Definition: RocBlas.h:36
static int mul
Definition: RocBlas.h:38

Here is the call graph for this function:

Member Data Documentation

int b_rb_hdl
private

Definition at line 144 of file basic_actions.h.

Referenced by init(), and run().

int f_pf_hdl
private

Definition at line 141 of file basic_actions.h.

Referenced by init(), and run().

int f_tf_hdl
private

Definition at line 141 of file basic_actions.h.

Referenced by init(), and run().

int f_ts_hdl
private

Definition at line 141 of file basic_actions.h.

Referenced by init(), and run().

FluidAgent* fagent
private

Definition at line 139 of file basic_actions.h.

Referenced by ComputeFluidLoad_ALE(), init(), and run().

int fb_mdot_hdl
private

Definition at line 143 of file basic_actions.h.

Referenced by init(), and run().

int fb_mdot_tmp_hdl
private

Definition at line 143 of file basic_actions.h.

Referenced by init(), and run().

int fb_nf_alp_hdl
private

Definition at line 144 of file basic_actions.h.

Referenced by init(), and run().

int fb_pf_hdl
private

Definition at line 142 of file basic_actions.h.

Referenced by init(), and run().

int fb_rhof_alp_hdl
private

Definition at line 143 of file basic_actions.h.

Referenced by init(), and run().

int fb_tf_hdl
private

Definition at line 144 of file basic_actions.h.

Referenced by init(), and run().

int fb_ts_hdl
private

Definition at line 142 of file basic_actions.h.

Referenced by init(), and run().

SolidAgent* sagent
private

Definition at line 140 of file basic_actions.h.

Referenced by ComputeFluidLoad_ALE(), and run().

int traction_mode
private

Definition at line 138 of file basic_actions.h.

Referenced by ComputeFluidLoad_ALE(), init(), and run().


The documentation for this class was generated from the following files: