cuIBM
A GPU-based Immersed Boundary Method code
NSWithBody.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 #include "NavierStokesSolver.h"
10 #include "utilities/bodies.h"
11 
12 
20 template <typename memoryType>
21 class NSWithBody : public NavierStokesSolver<memoryType>
22 {
23 protected:
25 
27  forceY;
28 
29  std::ofstream forceFile;
30 
31  // calculate forces acting on an immersed body
32  virtual void calculateForce();
33 
34  // store parameters of simulation and initialize immersed bodies
35  void initialiseBodies();
36 
37  // update location and motion of each immersed body at current time
38  void updateBodies();
39 
40 public:
41  // write flow variables and position of body points into files
42  virtual void writeCommon();
43 
44  // close iteration file and force file
45  virtual void shutDown();
46 }; // NSWithBody
void initialiseBodies()
Stores the parameters of the simulation and initializes the location and motion of each immersed bodi...
Definition: NSWithBody.cu:16
double real
Is a float or a double depending on the machine precision.
Definition: types.h:116
virtual void writeCommon()
Writes flow variables and position of body points into files.
Definition: NSWithBody.cu:136
real forceX
force acting on each body in the x-direction
Definition: NSWithBody.h:26
real forceY
force acting on each body in the y-direction
Definition: NSWithBody.h:26
Declaration of the class bodies.
Contains information about bodies in the flow.
Definition: bodies.h:19
std::ofstream forceFile
file to write the forces
Definition: NSWithBody.h:29
void updateBodies()
Updates location and motion of each immersed body at current time.
Definition: NSWithBody.cu:45
virtual void calculateForce()
bodies< memoryType > B
bodies in the flow
Definition: NSWithBody.h:24
Generic Navier-Stokes solver in the presence of immersed boundaries.
Definition: NSWithBody.h:21
Solves the Navier-Stokes equations in a rectangular domain.
virtual void shutDown()
Closes iteration file and force file.
Definition: NSWithBody.cu:159