Sie sind auf Seite 1von 11

Explain about the use of equations mentioned in the paper to solve.

There are two types of grids used in the immersed boundary method which are Lagrangian for the
immersed boundary and a fixed cartesian (Eulerian) grid for the fluid.
Immersed boundary method is one of the methods to study fluid structure interactions. In the
referred paper a direct-forcing method is discussed. The forcing term is determined by the
difference between the interpolated velocities on the boundary points and the desired boundary
velocities. This forcing term is added to the Navier Stokes equation which takes care of the fluidsolid interaction. In this method the body is identified by a volume of solid function eta. The mesh
cells containing the fluid are marked as 0 and the cells contained within the solid are marked as 1.
The volume of solid method is implemented here instead of velocity interpolation method. The
decrese in accuracy can be minimized by using a fine grid near the solid boundary. The fluid
enclosed inside the solid boundary is given a prescribed velocity. The same governing equations as
outside are used to solve the pressure field inside the solid boundary.
The velocity is solved for in Ueqn.H.
It is then corrected for pressure in PEqn.H where the forcing term is calculated as given in [1]. This
forcing term is used to correct the velocity inside the solid boundary.
The implementation of this in OpenFOAM is mentioned in fig .1.
Changed Approach
As mentioned in [1], the forcing term is found using eq. 1 by calculating the difference between the
prescribed velocity and the velocity of the fluid within the solid boundary.
Equation: 2
In the previous approach the value of U2 was used as the velocity at the previous time step. But as
mentioned in [2], the governing equations are first solved for the entire domain, including the cells
inside the solid boundary. The solid body velocity thus needs to be forced to be equal to the
prescribed velocity. The force is therefore calculated by finding out the difference between the
intermediate velocity calculated by solving the goverinng equations without the forcing term and
the prescribed velocity. Thus the velocity U2 in this case is not of the previous timestep as
mentioned in [1] but the one calculated at the same time step without considering the forcing term
in the governing equations.
Using this value of U2 to find out the forcing term and then using it to update the velocity field
using eq. 2 is equivalent to making the velocity in the cells contained in the solid region to be zero
or the value of prescribed velocity depending upon the body is stationary or moving.

Validation of aprroach 2
The mesh used for this simulation is shown in fig. 6. Three different sizes of mesh consisting of 20,
40 and 80 thousand elements were used. The value of Cd obtained using a mesh size of 80000 was
closest to the ones reported in [1]. This is shown in fig. 7.

Using the altered approach to calculate the forcing term, the benchmark problems of flow over a
cylinder at a Reynolds number of 40 were solved again and results compared with the ones reported
in literature.

The values of coeffecient of drag (Cd) obtained using this approach matched the reported values
much more closely than the previous approach. The vorticity contours obatianed for Re = 40 and Re
= 100 can be seen in fig. 2.

FIGURE OF VORTICITY CONTOURS


TABLE OF CD AND WAKE LENGTH

FIGURE OF MESH USED


The simualtion was also run for the case of two cylinders in tandem as shown in fig. 3 for a
Reynolds number of 200. The distance between the centers of the two cylinders is 3D, where D is
the diameter of the cylinder. The value of CD was calulated by declaring two scalar fields,
FOAM_MASK1 and FOAM_MASK2 and following the steps shown in fig. 4. The vorticty
contours and Cd value obtained are shown in fig. 3.
FIGURE OF CALCULATION OF TWO CD
Cd1 = 0.95 and Cd2 = -0.11

Using TopoSet
A scalar field is defined in the entire computational
domain named FOAM_MASK. The presence of cylinder or any other body may be characterized
by assigning a value of one to the scalar field there and zero everywhere else. For the case of a
moving body or in particular an oscillating cylinder, the scalar field needs to be updated at every
time step. The following two approaches were used to update the scalar field.
Approach 1:
Creating a function library
setFields is an OpenFOAM utility which can be used to define a scalar field and assign values to it
which it reads from dictionary defined in the system folder named setFieldsDict. This is a utility
which is used at the preprocessing stage of simulation. In order to use this as a function, dictionaries
need to defined at runtime. By studying the source code of setFields utility it was found that it reads
in the definition of the cylinder in terms of the center and radius from the setFieldsDict and uses
functions defined in topoSet. EXPLAIN IN DETAIL.
Define the equations and how they were used in the functions.
These flow chart is given in the description below.
Problems: Using this approach the FOAM_MASK file were generated at each time step which
could be used for visualzation but the values of this scalarfield were only read once at the beginning
of the simulation. Thus the velocity was being updated only at the initial position of the cylinder
even though the cylinder was oscillating.
Approach 2:
In order to to feed in the new values of the scalar field corresponding to the moving cylinder a small
code snippet was added within the source file directly. The earlier defined setFields function was
also used to generate Foam_mask files for visualization of the moving cylinder in paraview. The
code snippet checks if the center of each mesh cell lies inside the defined circle. If it does lie within,
that particualr cell is assigned a value of one otherwise zero. The code is shown in fig. 1.

Runtime dictionaries
The setFields utility only reads the setFieldsDict the beginning and fixes the values of the scalar
field. For the case of a moving body, a dictionary needs to created at runtime without being stored.
This dictionary can then be used as an argument for the defined setFields function. There are two
dictionaries defined at runtime, one sets the default values of the scalar field and the other defines
the body shape parameters, which in this case corresponds to the radius and the center axis of the
cylinder. The values of the coordinates of the axis are calculated at every interval using the equation
defining the motion of the cylinder.

MOVING CASE
To simulate the case of a moving cylinder, the second approach was used to generate the value of
FOAM_MASK at every time step.

To verify the values of Cd and Cl reported in the paper, the simulation for the oscillating cylinder
was also run using the pimpleDyMFoam solver in OpenFoam which is as a transient solver for
incompressible, flow of Newtonian fluids on a moving mesh using the PIMPLE (merged PISOSIMPLE) algorithm. A body fitted mesh was used for this. The value obtained using this are in
agrrement with the values mentioned in [1] which can be seen in table 1.
The value of Cd and Cl obtained using this approch do not match the ones obtained from
pimpleDyMFoam solver as well as the ones given in [1]. The comparison is shown in fig. 4.

INSERT TABLE HERE


WITH THE CD AND CL(MAX) VALUES

These images are at t = 150 seconds.


Verification-2:
To verify the values of cd and cl for the moving case, another problem of an oscillating cylinder in a
stationary domain was considered. The channel mesh used for this case is shown in fig. 5. The size
of the computational domain size is (2.20.41). The mean location of the cylinder center (X 0 , Y
0 ) is (1.1, 0.2) relative to the left bottom corner of the domain. The diameter, D of the cylinder is
equal to 0.1. The left, right, top and bottom boundaries are prescribed no-slip boundary conditions.
The location of the center (X c , Y c ) of the cylinder as it oscillates sinusoidally is given by

(X c (t) = X 0 + A sin(2f t), Y c (t) = Y 0 ), where t is the time, and A = 0.25 and f = 0.25 are
amplitude and frequency of the oscillation, respectively. The kinematic viscosity of the fluid is
given by = / = 10 3 m 2 /s and its density by = 1 kg/m 3 . The fluid in channel is initially at
rest.
The vorticity contours obtained are shown in fig. 6 and the cd and cl plots are shown in fig. 7.

The value of lift coefficient obtained for the above case does not agree completely with the one
reported in [2]. Although the drag coefficient has closer values.
To validate the method mentioned in the referred paper, a simple 2 dimensional case of flow over
a circular cylinder was considered. In the beginning a simple rectangular mesh consistisng of
hexhhedral elements shwon in fig. 2 was used.
Mention the solver settings.
Euler scheme is used for time discretizatioon
The simulations were run on varying mesh sizes of 25, 50, 100 and 200 thousand. The values of
coefficient of drag (Cd) calculated using the procedure described in the referred paper. There was
a downward trend in the value of CD obtained as shown in fig. 3 which is below the expected value
of Cd reported in literature for a Reynolds number of 40.

For better resolution of the cylinder surface within the mesh, a computational mesh with more cell
concentraion near the region contataining the cylinder was used. This mesh is shown in fig. 4. But
this too gave similar results and for refined mesh the solution diverged in the region containing the
cylinder cells.

A third attempt was made using a computational grid for the body fitted case but with the space
occupied by the cylinder was filled with mesh elements. This way the curvature of the cylinder was
fully captured. This particular mesh and the cylinder cells are shown in fig 5. The simulation was
run for a Reynolds number of 40 but it failed to provide the right values of Cd as well.
For the above case upto 3 orthogonal correctors were used to account for non-orthogonality present
in the mesh near the cylinder.
Also for all of three approaches, a variation of PIMPLE algorithm was used with upto 20 outer
correctors.
Reasons for which the method mentioned in the paper might be wrong
The main aim was that the forcing term should be able to change the velocity of the cylinder cells to
that given by the prescribed motion or in the case of a stationary cylinder to zero. But at every time
step the forcing term was unable to completely change the velocity to the desired value and the
build up of the errors in velocity change caused the solution to diverge after a few iterations.

Calculating CD and CL values.


For a single cylinder

For two cylinders


When there are two cylinders, the value of Cd needs to be calculated separately for both of them.
Therefore in this case there needs to be two scalar field FOAM_MASK1 and FOAM_MASK2 and
they are defined separately.

Das könnte Ihnen auch gefallen