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

Errors with sloshing simulation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 14, 2012, 14:24
Default Errors with sloshing simulation
  #1
New Member
 
Denis
Join Date: May 2012
Posts: 4
Rep Power: 13
iamdenis is on a distinguished road
Hello everyone,

sorry for starting another thread on sloshing.. as I have seen many others on this forum.

I am trying to get a sloshing simulation for a coffee cup (using water for now) with an opening at the top. I would like to detect the amount of liquid which leaves the cup due to a periodic motion.

I have done the flow over a bump tutorial and read over some basics on CFX.

If anyone could please assist me with any of these problems I would greatly appreciate it.

1. Since there is no inlet/outlet I am trying to set initial conditions with:

LIBRARY:
CEL:
&replace EXPRESSIONS:
Water height = 5 [ m]
denh = (denwater - denref)
denref = 1.185 [kg m^-3]
denwater = 997 [kg m^-3]
motion = sin(theta) [m/s]
pressure = denh*g*vliquid*((Water height)-y)
vair = 1.0 - vfliquid
vfliquid = (y-(Water height))/y

END
END
END

-but this does not seem to give me a water height of 5m.


2. I have applied symmetry to 2 faces, walls to the bottom and 2 other faces and opening at the top.

I am trying to apply "motion" , a periodic sine motion to the walls but it gives me an error unless I apply it in the W direction. Even then, I do not get any motion in CFD-Post.

Capture.PNG
(using a prism right now for simplicity)

Thank you for the help,
Denis
iamdenis is offline   Reply With Quote

Old   November 14, 2012, 16:31
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Use the if-then or step function to give a sharp transition from water to air. This function just linearly adjusts it over a long distance - this is not what you want.
ghorrocks is offline   Reply With Quote

Old   November 15, 2012, 15:25
Default
  #3
New Member
 
Denis
Join Date: May 2012
Posts: 4
Rep Power: 13
iamdenis is on a distinguished road
Thank you or the tip Glenn!

I made this my CEL code:

LIBRARY:
CEL:
&replace EXPRESSIONS:
Water height = 20 [ cm]
cm = 1 [cm]
denh = (denwater - denref)
denref = 1.185 [kg m^-3]
denwater = 997 [kg m^-3]
motion = 5*sin(t*(360[rad/s])) [cm]
pressure = denh*g*vfliquid*((Water height)-y)
vair = 1.0 - vfliquid
vfliquid = step((Water height - y)/cm)*1.0

END
END
END


I am now getting an error of:

A negative ELEMENT volume has been detected. This is a fatal
error and execution will be terminated. The location of the first
negative volume is reported below.
Volume : -0.6276E-06
Location : ( -0.75701E-01, 0.33485E+00, 0.70440E-01)



I applied "unspecified motion" to the domain, the symmetry walls and the opening. And put in the "motion" expression into X specified displacement for the 3 walls (two sides and the bottom)

Thank you,
Denis
iamdenis is offline   Reply With Quote

Old   November 15, 2012, 16:53
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
You have not specified your domain motion correctly. If you want the whole thing to oscillate back and forth as a rigid body then you need to apply your motion expression to all boundaries.

To debug mesh motion errors, do a simulation where you output a results file every time step including the mesh. You can also turn off the momentum/energy/turbulence solvers using expert parameters to make it go faster. Then run it and you will see the mesh motion you defined. This allows you to quickly debug the mesh motion.

Also note this model can be done much more simply by changing the gravity vector. This is an approximation which does not precisely model the motion but it might be close enough and it is much easier and faster to run.
ghorrocks is offline   Reply With Quote

Old   November 16, 2012, 13:28
Default
  #5
New Member
 
Denis
Join Date: May 2012
Posts: 4
Rep Power: 13
iamdenis is on a distinguished road
Hi Glenn,

I fixed the mesh error by reducing mesh element size.

I am now trying to run the simulation in CFD -post but am unable to get the right animation.

I am trying to get something like:
http://www.youtube.com/watch?v=jSs1sFp673o


But my water is just moving back and forth, I am not getting any sloshing.
I set all of the domains to the specified motion, including the water/air domain inside the box.

Sorry for all the questions. I am getting very close and am just missing a few steps!

Thanks again,
Denis
iamdenis is offline   Reply With Quote

Old   November 17, 2012, 19:03
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
First of all - make sure you get the physics right. Are you simulating a regime where sloshing occurs? If the Reynolds number is too low you will not get sloshing. Also are you correctyl resolving the free surface? If you have excessive diffusion of the surface you will not get sloshing. Is the volume fraction gradient from 0 to 1 resolved over a few elements?
ghorrocks is offline   Reply With Quote

Old   November 20, 2012, 02:55
Default
  #7
New Member
 
Denis
Join Date: May 2012
Posts: 4
Rep Power: 13
iamdenis is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
First of all - make sure you get the physics right. Are you simulating a regime where sloshing occurs? If the Reynolds number is too low you will not get sloshing. Also are you correctyl resolving the free surface? If you have excessive diffusion of the surface you will not get sloshing. Is the volume fraction gradient from 0 to 1 resolved over a few elements?

Thank you for all the help Glenn.
Finally got it working.

-Denis
iamdenis 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
Transient simulation not converging skabilan OpenFOAM Running, Solving & CFD 14 December 16, 2019 23:12
Simulation of sloshing by time varying gravity Manoj Kumar FLUENT 3 June 13, 2011 03:34
two Phase column simulation chemeng OpenFOAM 3 August 18, 2010 12:53
Problems with simulating TurbFOAM barath.ezhilan OpenFOAM 13 July 16, 2009 05:55
sloshing simulation nabeel mohsin FLUENT 1 April 14, 2005 07:04


All times are GMT -4. The time now is 21:04.