CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Tank sloshing in fluent diverging...need help (

lostin4ever November 11, 2009 08:15

Tank sloshing in fluent diverging...need help
I am trying to simulate a sloshing tank problem using vof and 3ddp. To mimic the lateral motion of tank I have defined a udf of source term in motion direction (n my case it is Y dirn) . I have got results for a time period 0.44 and it seems to be okay. When I am trying to run he simulation for higher time period ( 1.33 ,1.25) my continuity residual is diverging after (1.8-2 sec ) simulation. Here are my solver and other settings.

For different time I need to change my Udf time everytime that I am doing.I have attached my udf.

Reading "D:\tank\tanknearfirstmodet=1.25\tanknearfirst mode t=1.25.cas"...
61250 hexahedral cells, zone 2, binary.
9450 quadrilateral wall faces, zone 3, binary.
179025 quadrilateral interior faces, zone 5, binary.
66096 nodes, binary.
66096 node flags, binary.

Opening library "libudf"...
Library "libudf\ntx86\3ddp\libudf.dll" opened

fluid (phase-1)
tankwall (phase-1)
default-interior (phase-1)
fluid (phase-2)
tankwall (phase-2)
default-interior (phase-2)
shell conduction zones,

Version: 3d, dp, pbns, vof, lam, unsteady (3d, double precision, pressure-based, VOF, laminar, unsteady)
Release: 6.3.26


Model Settings
Space 3D
Time Unsteady, 1st-Order Implicit
Viscous Laminar
Heat Transfer Disabled
Solidification and Melting Disabled
Species Transport Disabled
Coupled Dispersed Phase Disabled
Pollutants Disabled
Pollutants Disabled
Soot Disabled

Boundary Conditions


name id type
fluid 2 fluid
tankwall 3 wall
default-interior 5 interior

Boundary Conditions


Condition Value
Material Name water-liquid
Specify source terms? yes
Source Terms ((x-momentum) (y-momentum ((profile udf cell_y_source::libudf) (inactive . #f) (constant . 0))) (z-momentum))
Specify fixed values? no
Local Coordinate System for Fixed Velocities no
Fixed Values ((x-velocity (inactive . #f) (constant . 0) (profile )) (y-velocity (inactive . #f) (constant . 0) (profile )) (z-velocity (inactive . #f) (constant . 0) (profile )))
Motion Type 0
X-Velocity Of Zone (m/s) 0
Y-Velocity Of Zone (m/s) 0
Z-Velocity Of Zone (m/s) 0
Rotation speed (rad/s) 0
X-Origin of Rotation-Axis (m) 0
Y-Origin of Rotation-Axis (m) 0
Z-Origin of Rotation-Axis (m) 0
X-Component of Rotation-Axis 0
Y-Component of Rotation-Axis 0
Z-Component of Rotation-Axis 1
Deactivated Thread no
Porous zone? no
Porosity 1


Condition Value
Enable shell conduction? no
Wall Motion 0
Shear Boundary Condition 0
Define wall motion relative to adjacent cell zone? yes
Apply a rotational velocity to this wall? no
Velocity Magnitude (m/s) 0
X-Component of Wall Translation 1
Y-Component of Wall Translation 0
Z-Component of Wall Translation 0
Define wall velocity components? no
X-Component of Wall Translation (m/s) 0
Y-Component of Wall Translation (m/s) 0
Z-Component of Wall Translation (m/s) 0
Rotation Speed (rad/s) 0
X-Position of Rotation-Axis Origin (m) 0
Y-Position of Rotation-Axis Origin (m) 0
Z-Position of Rotation-Axis Origin (m) 0
X-Component of Rotation-Axis Direction 0
Y-Component of Rotation-Axis Direction 0
Z-Component of Rotation-Axis Direction 1
X-component of shear stress (pascal) 0
Y-component of shear stress (pascal) 0
Z-component of shear stress (pascal) 0
Specularity Coefficient 0


Condition Value

Solver Controls


Equation Solved
Flow yes
Volume Fraction yes


Numeric Enabled
Absolute Velocity Formulation yes

Unsteady Calculation Parameters

Time Step (s) 0.0099999998
Max. Iterations Per Time Step 20

Non-Iterative Solver Factors

Variable Max. Corrections Correction Tolerance Residual Tolerance Relaxation Factor
Pressure 10 0.25 9.9999997e-05 1
Momentum 5 0.050000001 9.9999997e-05 1
Volume Fraction 5 0.050000001 9.9999997e-05 1

Linear Solver

Solver Termination Residual Reduction
Variable Type Criterion Tolerance
Pressure F-Cycle 0.1
X-Momentum Flexible 0.1 0.69999999
Y-Momentum Flexible 0.1 0.69999999
Z-Momentum Flexible 0.1 0.69999999
Volume Fraction Flexible 0.1 0.69999999

Pressure-Velocity Coupling

Parameter Value
Neighbour Correction 1

Discretization Scheme

Variable Scheme
Pressure PRESTO!
Momentum Second Order Upwind
Volume Fraction Second Order Upwind
Solution Limits

Quantity Limit
Minimum Absolute Pressure 1
Maximum Absolute Pressure 5e+10
Minimum Temperature 1
Maximum Temperature 5000

Please someone check my solver settings and suggest about it. I am not sure these solver setting are right for simulating sloshing prob.I am just a novice in CFD.

thanks for help in advance.

Prob;em specification tank size 35X50X40 cm.

for time step I have tried 0.001, 0.005 and for all time step solution diverges after specific time.

Figd84 November 16, 2009 13:01

You need to write an UDF to that kind of movement. Post it here and IŽll take a look.

lostin4ever November 17, 2009 03:36

Here is my UDF.. I have checked this for som,e cases.. it is diverging nera the resonance freq of the tank...

I think the solver parameters need to change..

#include "udf.h"

#define pie 3.141592654

DEFINE_SOURCE(cell_y_source, cell, thread, dS, eqn)

{ real source;

float time = 1.25;

/* source term */

source =(-.02)*pow((2*pie/time),2)*C_R(cell,thread)*sin((2*pie/time)*CURRENT_TIME);

/* derivative of source term w.r.t. y-velocity. */

dS[eqn] = 0.;

return source; }

MSE February 24, 2010 08:18

I need source of 2D half fluid modeling in cylindrical tank to calculate fluid frequency provided in Fluent.

MSE February 24, 2010 08:20

I need source of 2D half fluid modeling in cylindrical tank to calculate fluid frequency provided in Fluent.

All times are GMT -4. The time now is 23:53.