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

Piston-fluid simulation

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 8, 2020, 13:13
Default
  #41
RJE
Senior Member
 
Jedidi
Join Date: Mar 2020
Posts: 142
Rep Power: 6
RJE is on a distinguished road
Here we go again,
i'll tell u all what i have done in details (PS:there's only a piston) :
*i mesh the cylinder with hexaedral (capt)
*i assign the material to the cylinder (steel) in the cell zone conditions
* i put gravity and transitient in general
*for the dynamic mesh i pick layering and 6dof
*then i create the spring motion (capt2)
*the dynamic mesh zone (cap3 and 4)
*i set the method piso (cap5)
*i initialize it and then i put size step time as 0.1 and nbre of time step as 10
i get like usually :Error: Update-Dynamic-Mesh failed. Negative cell volume detected.
Error Object: #f
Attached Images
File Type: gif Capt.GIF (29.8 KB, 12 views)
File Type: gif Capt2.GIF (40.2 KB, 14 views)
File Type: gif Capt3.GIF (88.0 KB, 10 views)
File Type: gif Capt4.GIF (81.5 KB, 9 views)
File Type: gif Cap5.GIF (49.6 KB, 8 views)
RJE is offline   Reply With Quote

Old   April 8, 2020, 15:10
Default Setup
  #42
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
Though dynamic mesh does not care about it but the zone should be fluid and not solid because the zone represents the gas region. As far as piston is concerned, only its crown is important. Rest of the walls represent side wall of cylinder and cylinder head. Gravity is not essential. If the height of one layer of mesh is close to 0.002 m, then your setup is correct. However, your time-step could be too high. You should test your case with 1e-3 or 1e-4 s. The other option is to calculate the velocity manually and then determine what \Delta t you should use. This can be done by integrating Newton's equation for motion with mass of piston as mass and the force of preloaded spring as force. But 1e-3 or 1e-4 should work.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   April 8, 2020, 16:08
Default
  #43
RJE
Senior Member
 
Jedidi
Join Date: Mar 2020
Posts: 142
Rep Power: 6
RJE is on a distinguished road
i set cylinder as solid because the piston is solid (i model just the piston) why should i put it as fluid ?
RJE is offline   Reply With Quote

Old   April 8, 2020, 16:31
Default Objective
  #44
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
As per your first post, the objective is to fill a cylinder with gas that should push the piston. If piston is solid, then it is not a fluid flow problem at all. A solid piston is not supposed to contract or expand, only move up and down.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   April 8, 2020, 16:45
Default
  #45
RJE
Senior Member
 
Jedidi
Join Date: Mar 2020
Posts: 142
Rep Power: 6
RJE is on a distinguished road
Yes it's a solid problem but i try to model the piston lonely because i wasn't sure it was work correctly.
in my physic problem the fluid which is the oil push the piston which is a solid to the right due to the pressure force in the inlet.
should i put the inlet in the dynamic mesh as a rigid body w describe there the motion (with a profile)?
RJE is offline   Reply With Quote

Old   April 8, 2020, 16:52
Default Setup with Pressure
  #46
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
Solid body of the piston is not required until and unless you are interested in determining the temperature profile in the piston crown and skirt. Otherwise, piston is just a boundary. For you case setup, as you depicted in the image you drew on the paper, you just need an inlet boundary, the walls of the cylinder and its head and the wall representing the piston. Now, the wall representing the piston should have 1DOF applied with layering as the only chosen method. Apply mass flow rate or pressure inlet at the inlet. Spring would be included in the 1DOF setup. The pressure from the oil will push the piston down while spring with try to push it up. However, it all depends on the objective. In most of the scenarios, there is either a two-way valve or there are two valves, one for inlet and another for outlet. As far as motion of piston due to imbalance in force of oil and force of spring is concerned, that would work based on the setup I explained. And you can do it using 2D axisymmetric case if there is no asymmetric component.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   April 8, 2020, 17:16
Default
  #47
RJE
Senior Member
 
Jedidi
Join Date: Mar 2020
Posts: 142
Rep Power: 6
RJE is on a distinguished road
so if i get it right piston is just a boundary and i don't need even to model it, i'll take the wall and the head and suppose that it's the piston
the fluid will be just in the inlet ?
i understand know why did u speak about gas (a little bit late )
RJE is offline   Reply With Quote

Old   April 9, 2020, 03:53
Default Correct
  #48
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
You got it right. Whole of the domain would be fluid. Piston would just be a wall.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   April 9, 2020, 19:15
Default
  #49
RJE
Senior Member
 
Jedidi
Join Date: Mar 2020
Posts: 142
Rep Power: 6
RJE is on a distinguished road
hi,
u have told me that for the step time i can calculate velocity w then using newton's equation to calculate time step ,
but how to calculate velocity it'san inknown of the problem ?
RJE is offline   Reply With Quote

Old   April 10, 2020, 04:17
Default Time-Step
  #50
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
Yes, velocity is unknown but an initial value can be determined for the velocity.

F_{spring} = m_{piston}\frac{\partial\dot{v}}{\partial t}

Since everything is known, this can be integrated once to give a velocity after certain small time-step. Initial condition is that velocity is 0.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   April 10, 2020, 10:07
Default
  #51
RJE
Senior Member
 
Jedidi
Join Date: Mar 2020
Posts: 142
Rep Power: 6
RJE is on a distinguished road
as i know from analytic calcul : this piston have to move only 3 or 4 mm
for a piston with m=0.4 kg and Fspring (preload)= 360N
dt will be about 10e-6, so for 1s i have to put 10e+6 : step number
it's too much
RJE is offline   Reply With Quote

Old   April 10, 2020, 10:16
Default Calculation
  #52
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
For a 0.4 kg piston, 360 N force implies an acceleration of more than 9g. If initial velocity is 0 m/s, it would be moving at 0.9 m/s after 1 ms or 90 mm/s after 1 ms. If it has to move only 3 or 4 mm, then the time required is anyway quite small. However, 360 N is not the only force acting on it because there is force from the oil as well. Always the resulting force is taken into account. And resulting force would be much smaller.

You might be able to run with 1e-3 or 1e-4 s as time-step. Run for 5 time-steps and if you observe big movement, reduce the time step.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   April 11, 2020, 08:28
Default plot a chart
  #53
RJE
Senior Member
 
Jedidi
Join Date: Mar 2020
Posts: 142
Rep Power: 6
RJE is on a distinguished road
i want to plot the velocity ' or displacement vs time graph of the piston. Can you please elaborate on this step?
i tried using transient but in CFD post but nothing was shown
RJE is offline   Reply With Quote

Old   April 11, 2020, 10:14
Default Velocity/Displacement
  #54
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
For CFDPost, you will have to save a lot of intermediate files. Then, you have to use Transient Chart to plot it. Better idea is to do it in Fluent. However, for both scenarios, you need to enable it before starting the simulation, otherwise the data is lost. If you saved some intermediate files, you can load those in CFDPost and can certainly plot the displacement vs time.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   April 11, 2020, 10:37
Default
  #55
RJE
Senior Member
 
Jedidi
Join Date: Mar 2020
Posts: 142
Rep Power: 6
RJE is on a distinguished road
that's mean i have to creat solution data export in calculation activities ? and then beginning the simulation
RJE is offline   Reply With Quote

Old   April 11, 2020, 10:40
Default Transient Data
  #56
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
Fluent does not store data at all time-steps. Only the current time-step and last two time-steps are available. Last two are also not directly available. So, if you did not save the intermediate data, you have to run the simulation again.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   April 11, 2020, 11:34
Default
  #57
RJE
Senior Member
 
Jedidi
Join Date: Mar 2020
Posts: 142
Rep Power: 6
RJE is on a distinguished road
1-ok i have to put auto save every nbre of itérations i want.
2-i have another problem in the mesh, when i use multizone (to creat hexa mesh) i got "multizone Blocking Decomposition failed."
i tried to split it and sweep also , but got the same problem,
Attached Images
File Type: gif C.GIF (68.2 KB, 5 views)
RJE is offline   Reply With Quote

Old   April 11, 2020, 11:38
Default Meshing
  #58
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
That's because of the small duct on the side. With that in place, you cannot create sweep mesh. If the piston is never going to reach a level where it touches the small side duct, then you can separate the region into two cylinders. And then mesh the top cylinder, containing small duct on the side using tet mesh and the bottom cylinder portion where piston will move using sweep mesh. You have to mesh sweep portion before you mesh tet region.

While saving data, use flow-time or time-step based frequency and NOT iterations, i.e., save every 5 or 10 time-steps or 100 time-steps but not 100 iterations.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   April 11, 2020, 11:49
Default
  #59
RJE
Senior Member
 
Jedidi
Join Date: Mar 2020
Posts: 142
Rep Power: 6
RJE is on a distinguished road
no the piston won't reach the little duct, i'll try it
thanks
RJE is offline   Reply With Quote

Old   April 11, 2020, 18:40
Default
  #60
RJE
Senior Member
 
Jedidi
Join Date: Mar 2020
Posts: 142
Rep Power: 6
RJE is on a distinguished road
although doing this make ansys accept that meshi but after that in the simulation it get me out with the error "negative volume cells" i have decrease the time step but that doesn't help
i get this also "Note: zone-surface: cannot create surface from sliding interface zone.
Creating empty surface"
i think sliding the part into 2 parts give that problem
RJE is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
AVL FIRE ESE Diesel piston simulation initial condition rdrd4u AVL FIRE 1 July 15, 2015 02:53
Simple piston movement simulation ReVl27 FLUENT 1 February 20, 2015 09:28
variable density in single fluid simulation not running with total energy viking CFX 2 September 18, 2012 21:19
Expert parameter to stop the fluid flow simulation KK CFX 1 February 25, 2008 17:29
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 10:11


All times are GMT -4. The time now is 17:37.