Professional Documents
Culture Documents
www.ASEC.ir
1- sliding wall
2- moving reference frame (MRF)
3- sliding mesh (moving mesh)
4- dynamic mesh
www.ASEC.ir
sliding wall
www.ASEC.ir
٤
www.ASEC.ir
٥
www.ASEC.ir
٦
www.ASEC.ir
٧
www.ASEC.ir
٨
www.ASEC.ir
٩
www.ASEC.ir
01-SLIDING WALL:
١٠
www.ASEC.ir
- file / read / case
- display / grid
- define / boundary condition == > replace symmetry with axis
- grid /check
- define / model / solver == > axisymmetric swirl
- define / model / multiphase == > VOF
- define / material == > add liquid water to material list
- define / phases == > set water as 2nd phase
- define / operating condition == > set gravity (gx=9.81)
- define / boundary conditions == >
١١
www.ASEC.ir
١٢
www.ASEC.ir
- adapt / region == > mark domain for water patching (0.66<x<1 and 0<y<1)
- solve / control / solution == > choose piso for pressure-velocity coupling (best
for transient) and body force weighted for pressure discretization (best for
VOF and GRAVITY)
www.ASEC.ir
١٤
www.ASEC.ir
02-MOVING REFERENCE FRAME:
١٥
www.ASEC.ir
- file / read / case
- display / grid
- grid /check
- define / boundary conditions == >
١٦
www.ASEC.ir
- solve / init /initialize == > initialize with default values
- plot / residuals == > activate plot
- file / write / case and data
- solve / iterate
١٧
www.ASEC.ir
١٨
www.ASEC.ir
03- sliding mesh (moving mesh)
Calculate the domain velocities when the blades rotate over its origin (omega= rad/sec)
١٩
www.ASEC.ir
1- Create the domain with 2 overlapping circles separating the blades and outer square.
2- Set the interface B.C. for this two circles.
٢٠
www.ASEC.ir
3- Set 2 zones in gambit for inner and outer parts.
٢١
www.ASEC.ir
3- Read mesh in fluent (File / Read Case)
4- Set UNSTEADY solver (Define / Model / Solver)
5- Set the 3.1416 rad/sec rotational speed for inner zone
٢٢
www.ASEC.ir
6- Set the interpolation over 2 interface circles.
٢٣
www.ASEC.ir
7- Initialized the domain with its default values.
8- Enable residual monitoring (Plot / Residuals / Plot)
9- Write case&data
10- Iterate with dt=0.1
٢٤
www.ASEC.ir
٢٥
www.ASEC.ir
04- dynamic mesh
٢٦
www.ASEC.ir
a-DEFINE_CG_MOTION :
Uses linear and angular velocities at every time step to update the node positions on the
dynamic zone based on solid-body motion
٢٧
www.ASEC.ir
- CG motion of any object in domain (with stationary boundaries) or relative motion of two or more
objects in domain needs MESH UPDATE.
٢٨
www.ASEC.ir
Smoothing:
spring based
more or less grids
suitable for small movements
inputs:
Spring Constant Factor: controls the spring stiffness (between 0: no damping and 1: default damping)
Boundary Node Relaxation: for deforming boundaries (between 0: no smoothing and 1: no relaxation)
Convergence Tolerance controls the smoothing convergence
Number of Iterations specifies the number of iterations
٢٩
www.ASEC.ir
Layering:
Just for hexahedra or wedges in 3D, or quadrilaterals in 2D
split cells next to a moving boundary or merged it with the adjacent cell layer
suitable for small movements
inputs:
Split Factor
Collapse Factor
٣٠
www.ASEC.ir
Remeshing:
Remeshing based on cell skewness and minimum and maximum length scales as well as an optional
sizing function
Also remeshing based on the size distribution generated by the sizing function of original mesh
suitable for large movements
inputs:
minimum length scale
maximum length scale
maximum cell skewness
Size function (remesh considering background grid)
٣١
www.ASEC.ir
Examples:
CG motion:
٣٢
www.ASEC.ir
#include "udf.h"
DEFINE_CG_MOTION(piston,dt,vel,omega,time,dtime)
{
vel[1] = 100.*time*dtime;
omega[2] = 10.*3.1416/180.;
}
٣٣
www.ASEC.ir
٣٤
www.ASEC.ir
٣٥
www.ASEC.ir
٣٦
www.ASEC.ir
٣٧
www.ASEC.ir
٣٨
www.ASEC.ir
٣٩
www.ASEC.ir
٤٠
www.ASEC.ir
2-DEFINE_GEOM:
Specifies the geometry of a deforming zones which will appear in zones with moving boundaries
٤١
www.ASEC.ir
Geom:
٤٢
www.ASEC.ir
/************************************************************
* defining parabola through points (0, 1), (1/2, 5/4), (1, 1)
************************************************************/
#include "udf.h"
DEFINE_GEOM(parabola,domain,dt,position)
{
/* set y = -x^2 + x + 1 */
position[1] = (- position[0]*position[0] + position[0] + 1);
}
DEFINE_CG_MOTION(piston,dt,vel,omega,time,dtime)
{
vel[0] = -1.*time;
}
٤٣
www.ASEC.ir
1- Enble Unsteady
2- Enable Dynamic Mesh
3- Enable remeshing
4- Apply "Rigid Body" to right wall. Right wall must have it's name (separated from other walls in
Gambit)
5- Apply Deforming zone to down wall As follow:
٤٤
www.ASEC.ir
٤٥
www.ASEC.ir
٤٦
www.ASEC.ir
٤٧
www.ASEC.ir
6- Apply Deforming zone to parabola wall at the top As follow:
٤٨
www.ASEC.ir
٤٩
www.ASEC.ir
٥٠
www.ASEC.ir
٥١
www.ASEC.ir
٥٢
www.ASEC.ir
3-DEFINE_ GRID_MOTION:
If you need to control the motion of each node independently, then you can use
DEFINE_GRID_MOTION UDF
٥٣
www.ASEC.ir
Grid Motion:
٥٤
www.ASEC.ir
#include "udf.h"
DEFINE_GRID_MOTION(beam,domain,dt,time,dtime)
{
Thread *tf;
face_t f;
int n;
Node *v;
/* get the thread pointer for which this motion is defined */
tf=DT_THREAD(dt);
begin_f_loop(f,tf)
{
f_node_loop(f,tf,n)
{
v = F_NODE(f,tf,n);
NODE_Y(v)=NODE_Y(v)+fabs(NODE_X(v))*dtime;
}
}
end_f_loop(f,tf);
}
٥٥
www.ASEC.ir
1-Enble Unsteady
2-Enable Dynamic Mesh
3-Enable remeshing
4-Apply "User-Defined" motion type to relevant body As follow:
٥٦
www.ASEC.ir
٥٧
www.ASEC.ir
٥٨
www.ASEC.ir
٥٩
www.ASEC.ir
٦٠
www.ASEC.ir
٦١
www.ASEC.ir
9344
٦٢
www.ASEC.ir
8188 (without size function)
٦٣
www.ASEC.ir
5698 (size function resolution=3)
٦٤
www.ASEC.ir
5028 (size function resolution=0)
٦٥
www.ASEC.ir
)8050 (with size function resolution=1000
نكات:
-دو روش اول sliding wallو moving reference frameبراي مسائل پايا كاربرد دارد...
-پروژه ٢بايد با dynamic meshحل بشه تا با اين روش و udfنويسي آشنا بشيم
-براي Pressure farfieldبايد عدد ماخ تعريف بشه
Pressure farfield -و mass flow inletبراي جريان تراكم پذير كاربرد داره...
٦٦
www.ASEC.ir
براي تغيير نوع شرايط مرزي ميشه در فلوئنت ھم نوع شرايط مرزي رو تعيين كرد ...مثال يه شرط مرزي Pressure -
farfieldتعريف شده ميشه اون رو عوض كرد و چيز ديگه اي انتخاب كرد براي اين كار بايد به آدرس زير در فلوئنت رفت:
define / boundary condition
ﻣﺶ ﻛﺎﻧﻔﻮرﻣﺎل ﻣﺸﻲ ﻫﺴﺖ ﻛﻪ در ﻣﺮز دو داﻣﻨﻪ ﺗﻌﺮﻳﻒ ﻣﻲ ﺷﻮد ....در واﻗﻊ اﮔﺮ ﻣﺮز دو داﻣﻨﻪ ﻳﻚ ﺧﻂ ﺑﺎﺷﺪ ﻣﺶ ﺑﺎﻳﺪ ﺑﻪ -
ﺻﻮرت ﻛﺎﻧﻔﻮرﻣﺎل ﺑﺎﺷﺪ ...و اﮔﺮ ﻣﺮز از دو ﺧﻂ ﺗﺸﻜﻴﻞ ﺷﺪه ﺑﺎﺷﺪ ﻣﻲ ﺗﻮاﻧﻴﻢ ﻣﺶ آن ﻛﺎﻧﻔﻮرﻣﺎل ﺑﺰﻧﻴﻢ ﺑﻪ ﺻﻮرﺗﻲ ﻛﻪ اﻧﺪازه
ﻣﺶ ﻫﺎ در دو داﻣﻨﻪ ﺑﺎ ﻫﻢ ﻣﺘﻔﺎوت ﺑﺎﺷﺪ.
٦٧
www.ASEC.ir