top of page

Yanhao, graduate students at University of Michigan. Strong interest in CAE technology. Proficient in mesh generation, system simulation, FSI problem and system optimization.

More BI on the web
Follow Me
  • Facebook Basic Black
  • Twitter Basic Black
  • Black YouTube Icon
Search By Tags
搜尋

Make Boundary Moves in ANSYS FLUENT

  • 作家相片: Yanhao Zhu
    Yanhao Zhu
  • 2016年5月21日
  • 讀畢需時 2 分鐘

Simple cases such as check valves and store separations require boundary motion during the simulation. The dynamic mesh capability in ANSYS FLUENT is provided for this purpose.

The building blocks for dynamic mesh capabilities within ANSYS FLUENT are three dynamic mesh schemes, namely, smoothing, layering, and remeshing. A combination of these three schemes are used to tackle the most challenging dynamic mesh problems.

With the schemes mentioned above, FLUENT solver would automatically generate the mesh after the boundary moved. But in order to regulate the motion of boundary, a C script called User-defined function (UDF) should be crafted by the user. This is somewhat challenging since there is only a limited number of examples available.

A brief example, simplified fuel injector, is given here to demonstrate how UDF for dynamic mesh should be created. A macro named DEFINE_CG_MOTION is used for the rigid body motion of the injector needle. Script including DEFINE_CG_MOTION could only be 'compiled' to the solver(Another way to link UDF is 'interpreted', which is unfeasible here). The velocity of needle is set to be a constant (0.5) while the maximum displacement is 0.004 meter. The code is provided below:

#include "udf.h" static real max_disp = 0.004; static real velocity=0.5;

DEFINE_CG_MOTION(needle,dt,vel,omega,time,dtime) { NV_S(vel,=,0.0); NV_S(omega,=,0.0); if (!Data_Valid_P()) return; vel[0] = -velocity*pow(-1, (int)floor(time / (max_disp / velocity))); }

The following video shows the animation:

Normally, the mechanism of injector is simplified as a spring-damper system. Therefore, the force applied on the needle, apart from fluid motion, is a function of displacement and velocity. As long as the spring constant and damping coefficient is determined, a dynamic simulation can be given with the speed of needle updated at each time step in UDF.


 
 
 

Commentaires


Who Am I?

© 2023 by BI World. Proudly created with Wix.com

  • Facebook Basic Black
  • Twitter Basic Black
  • Black YouTube Icon
bottom of page