Python-Based Computational Fluid-Structure Interactions
Python-Based Computational Fluid-Structure Interactions
Fluid-Structure Interactions
Dr.Raymond LeBeau
Dr.Suzanne Weaver Smith
University of Kentucky
&
Dr.Thomas Hauser
Utah State University
FSI
Structure
Displacement & Velocity of Center and
FSI interface
Fluid, Structure solvers {U } t {U }
i 1 i t
NO
restart {U i} t
FSI iteration loop
YES
t=t+∆t
YES
t ≤ tfsi
NO
END
T≤t+i
Structural Grid
deflections
STIMULUS-II
Python is simple enough to stay out of the way of
the creative process -- like the pencil used by a
sketch artist -- yet powerful enough to create
sophisticated systems -- like an expensive CAD
program
Ogen Python
SWIG
LESTool Python
F2PY
GHOST Python
F2PY
%module overturec
%{
#include </home/satish/OVERTURE/Overture.v19/include/OvertureInit.h >
%}
class Overture
{
public:
static int start(int argc, char *argv[]);
static int finish();
};
>>import ansysinput
>>ansysinput.ansys_input(5,6)
ANSYS as a Subroutine
ANSYS can become one of the subroutines of your fortran program
A “Makefile” to link ANSYS libraries was written
Programmatically more efficient
mainan() is the key !!
ui p 1 ui
(ui u j ) ( )
t x j xi Re x j xi
Incompressible NS equations
Input Files,
Forces
Pressures
Input Files
F2PY
Input Files
Grid.dat
Python-Driver Script
Python Displacements and
Velocities
def fsi_iterate():
grid_generator()
fluid_solver()
pressure_to_force()
Input
structure()
Files,
Input
def grid_generator():
import overturec #imports module created by SWIG
# Creates grid with user parameters Pressures Forces
def fluid_solver():
Files
def structure(): #imports F2PY module for interface with ANSYS
# uses ANSYS as a subroutine
fsi_iterate()
F2PY
Input
Files
Grid.dat
SETUP FOR FSI Simulations
VORTEX-INDUCED VIBRATIONS - FSI
Boundary layers separate and two shear layers that aft trail in the flow
are formed
SCHEMATIC OF FLUID GRID
Inflow velocity = 1
Diameter of cylinder (D) = 1
Length = 80D, Width = 40D, Overset grid = 8D
98000 GRID POINTS (Background + Overset)
VORTICITY
Results for Re=3000 initial conditions case
1.25 < Ur < 2.7 – The cylinder performs steady oscillations in the drag direction
with a small amplitude in the lift direction
2.7 < Ur < 4.5: Expected path of the cylinder motion is a Lissajou figure
Fluid time: 72.7 sec (P) Fluid time: 75.4 sec (V)
Snap shot of pressure contour at 75.4 seconds
Lower pressure at the top
Pressure
CL and CD variation
Displacement and velocity histories – Case 1(a)
X-Displacement history Y-Displacement history
Y-displacement
Cylinder velocity history plots
x-velocity y-velocity
Cases 1(a) and 1(b) agree until FSI time 8 seconds
X-displacement Y-displacement
FSI test case 1(c) - results
Timestep: 0.01666
Technique: First order explicit-CSS
X spring- 4.092e7 g/s2
Y spring- 4.751e7 g/s2
‘k’ is the time level and the product hfk denotes the change in the value at that time level
FSI test case 1(d) – results
(ADAMS-BASHFORTH THIRD ORDER METHOD)