CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Simple piston movement simulation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 15, 2015, 11:37
Default Simple piston movement simulation
  #1
New Member
 
Nam Nguyen
Join Date: Jan 2015
Posts: 3
Rep Power: 11
ReVl27 is on a distinguished road
Hello everyone,

I'm doing a simple simulation of a moving piston with constant speed.

Here's the general idea:


As a beginner in both ansys and fluent, I decided to use layering dynamic mesh to control the motion of the piston.
Here's the content of my UDF:

#include "udf.h"
DEFINE_CG_MOTION(piston_head, dt, cg_vel, cg_omega, time, dtime)
{
cg_vel[0] = 0.001;
cg_vel[1] = 0.0;
cg_vel[2] = 0.0;
NV_S(cg_omega, = , 0.0); /* no angular motion */
}


* The fluid is air (ideal gas) and I start with a steady time calculation.

* The boundary condition for the inlet is set to "mass-flow inlet = 0.02 kg/s" and "gauge pressure = 0" for the outlet.

* I ran the steady solution with 200 timesteps, but the solution seemed not to be converged.


Then I continue with the transient time calculation.
* I compiled and loaded my UDF succesfully.

* In the dynamic mesh settings, I set the "piston zone" to rigid body, choose the piston_head::libudf, retain CG (0,0), cell height is 0.001m.

* That's it for dynamic mesh settings.

* Then I run the calculation again, the solution is converged but the piston didn't move at all. I don't know what I'm missing.

Can anyone please help?? My truly appreciation!
ReVl27 is offline   Reply With Quote

Old   February 20, 2015, 08:28
Default
  #2
Member
 
Join Date: Oct 2011
Posts: 80
Rep Power: 14
tsram90 is on a distinguished road
Quote:
Originally Posted by ReVl27 View Post
Hello everyone,

I'm doing a simple simulation of a moving piston with constant speed.

Here's the general idea:


As a beginner in both ansys and fluent, I decided to use layering dynamic mesh to control the motion of the piston.
Here's the content of my UDF:

#include "udf.h"
DEFINE_CG_MOTION(piston_head, dt, cg_vel, cg_omega, time, dtime)
{
cg_vel[0] = 0.001;
cg_vel[1] = 0.0;
cg_vel[2] = 0.0;
NV_S(cg_omega, = , 0.0); /* no angular motion */
}


* The fluid is air (ideal gas) and I start with a steady time calculation.

* The boundary condition for the inlet is set to "mass-flow inlet = 0.02 kg/s" and "gauge pressure = 0" for the outlet.

* I ran the steady solution with 200 timesteps, but the solution seemed not to be converged.


Then I continue with the transient time calculation.
* I compiled and loaded my UDF succesfully.

* In the dynamic mesh settings, I set the "piston zone" to rigid body, choose the piston_head::libudf, retain CG (0,0), cell height is 0.001m.

* That's it for dynamic mesh settings.

* Then I run the calculation again, the solution is converged but the piston didn't move at all. I don't know what I'm missing.

Can anyone please help?? My truly appreciation!
Please contact via mail. May be I can help.
sankarram90(a)gmail.com
tsram90 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
A simple 2D simulation getting stuck with No Error Alhasan OpenFOAM Running, Solving & CFD 3 April 5, 2020 17:01
Dynamic Mesh for Movement of Piston vigii Fluent UDF and Scheme Programming 0 November 18, 2013 06:43
A piston movement simulation mohammad CFX 2 January 8, 2012 19:39
Simple 3D IC two stroke engine simulation darren_camilleri FLUENT 1 December 3, 2011 08:31
piston movement STK FLUENT 0 October 7, 2004 08:01


All times are GMT -4. The time now is 05:25.