0% found this document useful (0 votes)
122 views

Sloshing Computacional

This document summarizes the governing equations for fluid sloshing in a container and the fluid-structure interaction modeling. It describes: 1) The incompressible Euler equations that govern fluid sloshing and the boundary conditions relating fluid velocity to container wall and free surface motion. 2) The variational formulation that couples the fluid and structure equations through terms relating normal fluid velocity and pressure on wetted surfaces. 3) The discretization of the coupled variational equations, resulting in a system of equations relating fluid potential, velocity, pressure, and structural displacement and velocity over time.

Uploaded by

Ivo Alves
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
122 views

Sloshing Computacional

This document summarizes the governing equations for fluid sloshing in a container and the fluid-structure interaction modeling. It describes: 1) The incompressible Euler equations that govern fluid sloshing and the boundary conditions relating fluid velocity to container wall and free surface motion. 2) The variational formulation that couples the fluid and structure equations through terms relating normal fluid velocity and pressure on wetted surfaces. 3) The discretization of the coupled variational equations, resulting in a system of equations relating fluid potential, velocity, pressure, and structural displacement and velocity over time.

Uploaded by

Ivo Alves
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

NA63873: Dynamics - Principles and

Computational Methods (Fall, 2016)

Lecture 14: Fluid-Structure Interaction


I - Sloshing Problem

14.1 Model equations

One of the simplest fluid-structure interact problems is fluid


sloshing in a container. Examples of fluid sloshing include: wa-
ter being spilt from a half-full cup when you walk fast while
holding it, liquid container collapsing during earthquakes, prob-
lems in LPG container cargo ship, etc. The governing equations
for describing the sloshing is the incompressible Euler equation
(i.e., inviscid fluid motion):

u 1
Governing equation: + (u )u = p (gz 0 ) (14.1)
t
For irrotational flow: u = 0 (14.2)
For incompressible fluid: u = 0 (14.3)
Velocity potential: u = (14.4)

where u is the fluid velocity measured in the eulerian frame;


is the fluid density; p is the pressure; g is the gravity; z 0 is the

hydraulic head; and = x i + y j + z k. First by substituting
the velocity potential equation(14.4) into the incompressibility
equation(14.3), we obtain

2 = 0 (14.5)

In order to solve the above Laplace equation, one needs bound-


ary conditions, which involves the container walls on which the
fluid velocity is the same as the the normal velocity of the con-
tainer and the free surface boundary conditions:

uw = n w = wn on w (14.6)
uf ree = n f ree = f ree on f ree (14.7)

1
where is the free surface motion and n denotes the normal
component with respect to the boundary surface.

It now remains to relate the free surface motion to the veloc-


ity potential. This can be obtained by the following procedure.
First, we note that the convective term, (u )u, can be ex-
pressed as

(u )u = 12 u2 u ( u) = 21 u2 (14.8)
since u = 0 where
u = u2x + u2y + u2z
2

The Euler equation(14.1) then becomes

p
{ + 12 u2 + gz 0 }=0
t

p 1
+ 2 + gz 0 =0 (14.9)
t
On the free surface, the preceding equation specializes to with
p = 0 and z = :

1
2
+ g =0 (14.10)
t
Neglecting the nonlinear term and time-differentiating once, we
obtain
2
g =0 on f ree (14.11)
t2
The surface motion can be related as

= on f ree (14.12)
z
By combining (14.11) and (14.12), we arrive at the free surface
equation in terms of the velocity potential as follows:

1 2
+ =0 on f ree (14.13)
z g t2

14.2 Variational Formulation of Fluid Sloshing

We have learned that the variational formulation of mechan-


ics problems leads to the governing equations plus appropriate

2
boundary conditions. To this end, lets begin with the following
variational statement:
Z
f luid = f (2 ) dV = 0 (14.14)
V

where the fluid density (f ) is introduced so that the above


equation has the dimension of energy (N.m).

Carrying out the indicated variation, we obtain


Z Z
f 2
f wn d + d
|
wall
{z }
f ree g t2
coupling to structure
Z
+ f () () dV = 0 (14.15)
V

where the velocity potential relation(14.4) on the wetted walls


and the free surface boundary condition(14.13) are used to ob-
tain the first and second term in the above derivation.

Note that the normal fluid velocity on the wetted walls must be
the same as the normal velocity component of the structure if
the container is moving or flexible. It is this term that introduces
fluid-to-structure coupling.

14.3 Variational Formulation of Fluid Container or Structure


Submerged in the Fluid

Lets begin with the following variational equation for the struc-
ture:
Z
structure = ( + f s f ws ) ws dV = 0 (14.16)
V

Variation of the first term takes the form of


Z
f ( ) ws dV =
V Z
ij nj wj d
dry
| {z }
traction on the dry surface
Z
+ ij nj wj d
wet
| {z }
coupling to the fluid
Z
ij ij dV (14.17)
|V {z }
strain energy energy of the structure

3
where nj is the unit vector component in the j-th direction.

Observe that, on the wetted surface, the second term in the


above equation can be expressed in terms of the fluid pressure(p):

Z Z
ij nj wj d = pwn d
wet wet
Z

= f ( gz 0 )wn d (14.18)
|
wet t {z }
via (14.9)

Substituting (14.18) into (14.17) into (14.16) we obtain the cou-


pled variational equation for the structure:

Z
[(f s f ws ) ws ij ij ] dV
V Z
+ ij nj wj d
dry
| {z }
traction on the dry surface
Z
+ f ( gz 0 )wn d (14.19)
wet
| {z }
coupling to the fluid

14.4 Coupled Sloshing-Structure Interaction

Now all we have to do is to add the energy of the interacting


systems, viz.:

total = f luid + structure = 0 (14.20)

4
Lets discretize term by term of the above variational expres-
sions:
Z
f wn d T [C]w (14.21a)
wall
Z
f 2
d T [Mf ] (14.21b)
Z
f ree g t2
f dV T [Kf ] (14.21c)
ZV Z
f s ws dV f gz 0 wn d
V Z wet

+ ij nj wj d wT qs (14.21d)
dry
Z
f wn d wT [C]T (14.21e)
Zwet
f ws ws dV wT [Ms ]w (14.21f)
ZV
ij ij dV wT [Ks ]w (14.21g)
V

Substituting the able discrete expressions into (14.20) leads to

T (Mf + Kf + Cw)
+ wT (qs Ms w Ks w + CT ) = 0 (14.22)

The stationarity of the above coupled variational equation yields


the following interaction equation:




Mf 0 0 C
+

0 Ms ws CT 0 ws






Kf 0 0
+

= (14.23)
0 Ks w q

s s

Figure 1 illustrate schematically how the two analysis modules,


sloshing module and the structural analysis module, can be se-
quentially used in a staggered manner to conduct couple-field
analysis.

Remark 1: The matrix associated with the velocity term is


usually designated as damping matrix. However, this is not the
case for the sloshing-structure interaction problem. This can be
seen by the following generic eigenvalue problem as specialized

5
arrying out
V
[(fthe
s indicated
f ws ) variation,
ws we
ij ij ] obtain
dV
Z
Z
+ ij nj wj d Z f @ 2
|
dry
f wn{z d + } d
traction
Structural analyzer on the dry
| Zwall {z Fluidsurface
} analyzerf ree
g @t2
+couplingto f ( gz
structure 0
) wn d (3
Z wet
|
FSI$Example$I:$Analysis$of$Fluid$Sloshing${z }
+ f (r ) (r
$$$$$$$$$$$$$$$$$$$$$$Interac;ng$$with$Container$Structure$
coupling to the fluid ) dV = 0
V
Fig. 1. structure interacting with contained fluid
to two-way problem:
here the velocity k m

f
potential
2
jc f
relation(3.4) on the wett







=0 (14.24)

nd the free surface jc k boundary
m ws
2
condition(3.13) are used t
s


s

he firstwhose
and second term in the above derivation.
characteristic equation is given by

(kf 2 mf )((ks 2 ms ) 2 c2 = 0 (14.25)

Note that
Remarkthe2: Itnormal
should be notedfluid velocity
that the matrix(M on the wetted walls
) involves
only the free surface, not the fluid volume. To be precise, if one
f

he samenodally
and as the
of the normal
nodes(r) for the velocity
fluid equation, we component
partition the fluid nodes into the free surface nodes (s)
the rest would of the stru
have for the fluid equation:
he container is moving or flexible. It is this term that int












(M ) 0
(K ) (K ) 0
uid-to-structure

coupling.
f s s f s f sr s
+ =







0 0 (K ) (K )
r
f rs Cw
f r r
(14.26)

.3 Variational Formulation
14.5 Partitioned formulation
teraction
of Fluid
of sloshing-vibration in- Container or S
Submerged in the Fluid
The variational formulation for the coupled sloshing and struc-
tural vibration problem(14.22) and the resulting coupled equa-
tions(14.23) may be viewed as a tightly coupled model system in
that both the structural analysis and sloshing analysis capabili-
ties have to in integrated into a single analysis code - - an effort
ets begin with the following variational equation for th
that requires significant software modifications.

ure: 6
Z
structure = (r + f s f ws ) ws dV = 0
In order to utilize existing sloshing and structural analysis soft-
ware modules with a minimum of modification, we reformulate
the interaction problem of sloshing and structural vibration via
partitioned formulation procedures. This is described below. To
this end, let us start with two uncoupled systems, viz.:

f = T (Mf + Kf )
s = wT (qs Ms w Ks w) (14.27)

which is obtained by deleting the coupling terms Cw from the


structure to the fluid and CT from the fluid to the structure
in (14.22).
278 J. A. GONZLEZ ET AL.

Figure 4. Treatment of non-matching interfaces using localized Lagrange multipliers. The fields of multi-
Fig.on2.
pliers theLocalized interface
fluid side !f and forside
the structural partitioned fluid
!s are discretized and
using structure
Dirac domains
delta functions collocated at
the nodes. If the fluid is inviscid, only normal displacements of the frame and normal components of these
As the fluid velocity is the multipliers
primary are considered.
variable (i.e., uf = wall ),
the appropriate interface conditions between the flexible con-
tainer
that walls
is restricted and the
to follow the fluid is given
fluidstructure interface.by
To do so, the framefluid and framestructure
relative displacements are required to vanish. These conditions are expressed in the frame local
system as
[(uf )wall Lf ub ] = 0 [wall Lf ub ] = 0
T
[(w)wall Ls ub ] B=.x0f ! xb / D 0, BT .xs ! xb / D 0, (42)

and extendedto the fluid interface !f and the structure interface !s , respectively. If the fluid is invis-
cid, the tangential stress on the wall is zero. Thus, T the tangential displacements of the(14.28)
fluid and the
` =at !f Tfbecome
structure wall
LInfthis
[independent. ub ]case,
+ only
s [(the wall condition
w)kinematic Ls ub ] of (42) in the normal
direction applies, that is,

T
` = Tf [BTf nLf" .xufb!] + xb /
DT0,[BT w nT
" .xsL! xub /]D 0. (43)
s s s b
This simplification reduces the displacement field on the frame to ub D ub with only one compo-
nent
where BTf isdirection,
in the normal whereas the
understood asLLMs of the fluid and structure
an approximation of side
thereduce to !f D "n
interaction
and !s D "s , respectively.
wall gradient operator (wall ).
7. VARIATIONALLY BASED INTERFACE COUPLING
Thus, Hamiltons principle for the partitioned sloshing-structural
Use of a variational
vibration formulationsystem
interaction to treat the fluidstructure
can connection by
be constructed possesses the significant
summing up
advantage of preserving the symmetry of the equations of motion. In the present section, the
(f ,
variational s ) from
framework (14.27)
described and
in [35] the
is used interface
to obtain functional
the interface (` ) from
coupling equations.

7.1. Interface constraint functional


Consider the fluidstructure boundary !b shown 7 in Figure 4, in which the interface frame carries
an independent field of displacements .ub /. The fluid boundary displacements .uf /, the structure
boundary displacements .us /, as well as their associated multipliers on the fluid .!f / and the struc-
ture .!s / will appear in the variational formulation of the interaction conditions. The interface
functional variation splits into contributions from fluid and structure:

f D int int
f C s (44)
(14.28) as:
Z t2
{f + s + ` } dt = 0
t1

with the change of variable = y
Z t2
...
[ yT (Mf y + Kf y)
t1
+ wT (qs Ms w Ks w)
n o
+ Tf (BTf y Lf ub ) + Ts (BTs w Ls ub ) ] dt = 0
(14.29)

Carrying out the time-definite integration, we obtain:


Z t2 Z t2
....
[ yT (Mf y + Kf y)
t1 t1
+ wT (qs Ms w Ks w)
n o
Tf (BTf y Lf ub ) + Ts (BTs w Ls ub ) ] dt = 0
(14.30)

This yields the following partitioned equation set:



M 0 0 0 0 0
s



w


K 0 0 Bs
s
0 0


w






q
s









0 M 0 0 0 0
0




f
y 1
Kf 0 0 Bf 0 y1

0









y
y
0

0 0 I00 0

0
I 0 0 0 0

...

+ =
T
0 0 000 0 s Bs 0 0 0 0 Ls
s


0






...










0 0 000
0
BTf 0 0 Lf
0
f 0 0
f

















0 0 000 0 u
b 0 0 0 LT LT 0
s
u
f b
0

y = y1
(14.31)

Note that the partitioned equation derived above turns out to


be non-symmetric. The reason for this is due to adopting the
velocity potential as the primary variable instead of velocity or
fluid displacement. A continuum description of the internal fluid
would yield symmetric system with the fluid displacement as the
primary variable. This is discussed next.

8
The following is a Matlab code for two-dimensional sloshing with
rigid rectangular walls. Good luck with the code! (as I do not
guarantee it works!)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Asemble velocity 2D potential elements for a rectangular shape
%
% [Ke]=element_sloshing_ke(xn,yn) - Laplace operator for the domain
% [Me]=element_sloshing_me(xn) - mass matrix for the surface only
%
%
% programmed by kcpark, 09/25/09
%%%%%%%%%%%%%%%%%%%%
%
%
% mesh size
%
nnode_x = input(number horizontal nodes = );
nnode_z = input(number of vertical nodes = );

%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% build volume Laplace operator matrix
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nelem_total = (nnode_x-1)*(nnode_z-1); % total number of elements


node_total = nnode_x*nnode_z; % total global nodes
node_elem = 4; % number of nodes in each element
dof_node = 1; % degrees of freedom per node
dof_elem = dof_node*node_elem; % total elemental dofs
dof_total = dof_node*node_total; % total global dofs

% get a uniform Laplace element matrix


xn = [ 0. 1. 1. 0.];
yn = [ 0. 0. 1. 1.];

[ke]=element_sloshing_ke(xn, yn);

% start from the bottom layer elements


%
% generate connectivity table
%
conn=sparse(zeros(nelem_total, node_elem));
IC=0;

9
for i = 1: (nnode_x-1) % z-direction sweep
nk = (i-1)*nnode_z ;
for j = 1:(nnode_z-1); % x-direction sweep
IC = IC+1;
start = nk + j;
conn(IC, 1) = start;
conn(IC, 2) = start + 1;
conn(IC, 3) = start+ nnode_z +1;
conn(IC, 4) = start +nnode_z;
end;
end

%
% generate the nodal coordinates
%
coord= zeros(node_total,2);
nodes = 0;

% For the element size of a unit square


for i = 1: nnode_x % x-direction sweep
x =(i-1);
for j = 1:nnode_z, % z-direction coord
z = (j-1);
nodes = nodes+1;
coord(nodes, 1) = x;
coord(nodes, 2) = z;
end;
end;
%end

%
% assemble the Laplace operator matrix
%
Kg = sparse(zeros(dof_total, dof_total));

for ne =1:nelem_total,
for i=1:node_elem,
nr = conn(ne,i);
for j=1:node_elem,
nc = conn(ne,j);
isub = (nr-1)*dof_node +1: nr*dof_node;
jsub = (nc-1)*dof_node +1: nc*dof_node;
ei = (i-1)*dof_node +1: i*dof_node;
ej = (j-1)*dof_node +1: j*dof_node;
Kg(isub, jsub) = Kg(isub, jsub) + ke(ei,ej);

10
end;
end;
end;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Obtain reduced matrix for the surface DOFs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dof_ss = nnode_x*dof_node;
dof_ii = dof_total - dof_ss;

K_ii = Kg(1:dof_ii, 1:dof_ii);


K_is = Kg(1:dof_ii, (1+dof_ii):dof_total);
K_si = (K_is);
K_ss = Kg((1+dof_ii):dof_total, (1+dof_ii):dof_total);
[Lk, Uk] = lu(K_ii);
K_schur = K_si * (Uk \ (Lk\ K_is));
K_reduced = K_ss - K_schur;
%
%%%%%%%%%%%%%%%%%%%%%%%%%%
% build the surface potential matrix
%%%%%%%%%%%%%%%%%%%%%%%%%%
%
nelem_total = (nnode_x-1); % total number of elements
node_total = nnode_x; % total global nodes
node_elem = 2; % number of nodes in each element
dof_node = 1; % degrees of freedom per node
dof_elem = dof_node*node_elem; % total elemental dofs
dof_total = dof_node*node_total; % total global dofs

conn=sparse(zeros(nelem_total, node_elem));
IC=0;
start = 0;
for i = 1: (nnode_x-1) % x-direction sweep
IC = IC+1;
start = start +1; % for unit element length
conn(IC, 1) = start;
conn(IC, 2) = start + 1;
end;

x_coord = [0 1];

% get a line elemental matrix


[me]=element_sloshing_me(x_coord);

% initialize the surface mass matrix

11
Mg = sparse(zeros(dof_total, dof_total));
% assemble the surface mass matrix
for ne =1:nelem_total,
for i=1:node_elem,
nr = conn(ne,i);
for j=1:node_elem,
nc = conn(ne,j);
isub = (nr-1)*dof_node +1: nr*dof_node;
jsub = (nc-1)*dof_node +1: nc*dof_node;
ei = (i-1)*dof_node +1: i*dof_node;
ej = (j-1)*dof_node +1: j*dof_node;
Mg(isub, jsub) = Mg(isub, jsub) + me(ei,ej);
end;
end;
end;
%
% Perform sloshing resonance analysis
%
[Phi_s, lambda] = eig(full(K_reduced), full(Mg));

lambda = diag(lambda);
[lambda,I]=sort(lambda);
Phi_s =Phi_s(:,I);
n_mode = input(number of modes to display = );
mode_extract = 2:n_mode+1;
lambda=lambda(mode_extract);
Phi_s=Phi_s(:,mode_extract);
g = 9.8; % grvitational acceleration (m/s^2)
omega = sqrt(lambda*g);
%
% compute the vertical displacement on the free surface
%
eta = (1./g)*Phi_s;
%
%plot the mode shapes on the free surface
%
for nplot =1:n_mode,
figure(nplot);

plot(eta(:,nplot));
xlabel(Surface span);
ylabel(Mode shape );
legend([ num2str(nplot), -th mode , ...
lambda = , num2str(lambda(nplot))]);
title(Sloshing Mode for 2D Rectangular Tank);

12
end;

%
% compare with the analytical frequency, lambda!
%
L = nnode_x;

km = (pi/L)*(1:n_mode);
tanhx = tanh(pi*(1:n_mode)); % for the case of H=L!

lambda_analytical = (km.*tanhx);
%
% error of the computed frequencies
%
error_percent = ...
100*(lambda_analytical-lambda)./lambda_analytical;
error = abs(error_percent);
figure(n_mode+1);
plot(error);
xlabel(Mode Number);
ylabel(Percentage Error in Frequency );
% legend([ num2str(nplot), -th mode , ...
% lambda = , num2str(lambda(nplot))]);
title(Computed Mode Error for 2D Rectangular Tank);
%%%%%%%%%%%%%%%%%%%%%
% (main program ends here)
%%%%%%%%%%%%%%%%%%%%%
function [Ke]= element_sloshing_ke(xn,yn);

% [ke]=element_sloshing_ke(xn,yn)
%
% Compute Laplace 2D operator
% for computing sloshing modes employing
% the velocity potential
%
%
% programmed by K. C. Park (24/09/09)
%
Nodes = 4;
Ndof =1;

xn = diag(diag(xn)); yn = diag(diag(yn));
bintpts = [ -1 1 1 -1; -1 -1 1 1]/sqrt(3);
sintpts = [ 0 0 -1 1; -1 1 0 0]/sqrt(3);

13
Ke = zeros(4);

for int_point=1:4,
xi=bintpts(1,int_point); eta=bintpts(2,int_point);
% shape function derivatives
dN1dxi =-(1-eta)/4; dN1deta =-(1-xi)/4;
dN2dxi = (1-eta)/4; dN2deta =-(1+xi)/4;
dN3dxi = (1+eta)/4; dN3deta = (1+xi)/4;
dN4dxi =-(1+eta)/4; dN4deta = (1-xi)/4;
dN_dxi_eta = [dN1dxi dN2dxi dN3dxi dN4dxi;
dN1deta dN2deta dN3deta dN4deta];

J = dN_dxi_eta*[xn yn];
detJ = J(1,1)*J(2,2) - J(1,2)*J(2,1);
Jinv = inv(J);

B = Jinv*dN_dxi_eta;
Bx = B(1, :);
By = B(2, :);

Ke = Ke + detJ*(Bx*Bx + By*By);
end
return

%
%%%%%%%%%%%%%%%%%%%%%%%
%
function [Me]=element_sloshing_me(xn)

% [me]=element_sloshing_me(xn)
%
% Compute 2D surface mass matrix
% for computing sloshing modes employing
% the velocity potential
%
%
% programmed by K. C. Park (24/09/09)
%

Nodes = 2;
Ndof =1;

xn = diag(diag(xn));
bintpts = [ -1 1]/sqrt(3);

14
Me = zeros(2);
for int_point=1:2,

xi=bintpts(1,int_point);
N1=(1-xi)/2;
N2=(1+xi)/2;
N = [N1 N2];

dN1dxi = - 1/2;
dN2dxi = 1/2;
dN_dxi = [dN1dxi dN2dxi];
J = dN_dxi*[xn];
detJ = J;

Me = Me + detJ*N*N;
end
return

15

You might also like