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

Flow in a capillary tube CFX-Pre

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 18, 2013, 13:40
Post Flow in a capillary tube CFX-Pre
  #1
New Member
 
Henry
Join Date: May 2013
Posts: 6
Rep Power: 5
contred is on a distinguished road
Hello,

I am new to ANSYS and I am having some trouble defining my boundary conditions for a capillary-driven (reference) model. The model is a capillary tube with an inner diameter of 0.2 mm.

Specifications:
Transient for 1s, 1e-4 timesteps.

Default Domain (air and water)
Homogeneous with standard free surface model is activated. Interface compression is 2.
Surface tension coefficient is 72 dyne/cm with air as primary fluid. Continuum surface force is activated and interphase transfer is set to free surface.

Input (bottom opening of the tube)
Normal speed is set to 1 m/s (should this be switched to a pressure definition instead?)
VF of water is 1.

Output (top opening)
Opening Pressure and direction with Rel. Pressure at 0 Pa.
VF of air is 1.

Wall (no-slip)
Adhesive is activated with contact angle of 5 degrees.

Initialization
0 Rel. P
VF of air is 1 (tube is filled with air initially).

Thank you for your help!
contred is offline   Reply With Quote

Old   May 18, 2013, 21:48
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,545
Rep Power: 97
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
Before you model this flow with the default options I recommed you try all the free surface options available in CFX. For this type of flow some work better than the defaults.

Also, do not use fixed time stepping. Use adaptive timestepping homing in on 3-5 coeff loops per iteration. Surface tension models need lots of small timesteps to run well.

As for the boundary condition - you put in bcs suitable for what you are modelling. Have a bit of a think about what you are doing - is a velocity or pressure boundary more suitable? I might sound like a school teacher here but this is a question you really should answer yourself.

I have done benchmarks of CFX against analytical solutions on this model and you will probably find you have significant error, and mesh refinement does not converge on a solution. This is due to the moving contact line issue of the Navier Stokes equations - CFX does not have a solution to this, so you will never get a grid refined solution. And so other Navier Stokes CFD code I am aware of has a model for it either, by the way.
ghorrocks is offline   Reply With Quote

Old   May 19, 2013, 07:11
Default
  #3
Member
 
rasool
Join Date: Apr 2013
Posts: 41
Rep Power: 5
rasool motamedi is on a distinguished road
Hi
your inner diameter is small and homogeneous with free surface may give you bad answer because it is eulerian.
the first study about teory
maybe you must use multicomponent flow
how you define surface tension coeficient?
rasool motamedi is offline   Reply With Quote

Old   May 19, 2013, 07:22
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,545
Rep Power: 97
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
This is a multi phase flow, not a multi component flow. Multicomponent will not work here.
ghorrocks is offline   Reply With Quote

Old   May 19, 2013, 12:32
Default
  #5
New Member
 
Henry
Join Date: May 2013
Posts: 6
Rep Power: 5
contred is on a distinguished road
Thank you for your responses! I believe the driving force should be a pressure difference rather than a velocity. But I am unsure of how big the difference should be seeing that capillary-driven models do not require much.

I will definitely give adaptive a shot. Are my parameters below reasonable?

First Update Time = 0s
Timestep Update Freq. = 1
Initial Timestep = 1e-30 s (or zero)
Max timestep =0.0001
Min timestep = 0.00001
Target min loops = 5
Target min loops = 3
Timestep Dec/Inc Factors is set to standard (0.8 - 1.06)


I am unsure of the Min and max timestep so I set it to that range.
contred is offline   Reply With Quote

Old   May 19, 2013, 19:30
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,545
Rep Power: 97
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
Usually the inlet at the bottom is at the level of a free surface just next to it. That means the pressure at the inlet can be modelled with a total pressure inlet.

Your initial time step is probably too small - it is smaller than your min time step so this is invalid.

Set your min timestep to 1e-8s, your max to 1s, and your initial to 1e-8s. Don't impose limits unless you know better than the solver does. It will find the correct time step soon enough. And if you want to run more efficiently then next time you can start it off with the time step you found from the first model.

Did you read the final paragraph of my post #2? This is a critical factor for this model.
ghorrocks is offline   Reply With Quote

Old   May 23, 2013, 23:26
Default
  #7
New Member
 
Henry
Join Date: May 2013
Posts: 6
Rep Power: 5
contred is on a distinguished road
Thank you again for your help.
I have been running several simulations using adaptive timestepping and I am coming up with good solutions.

However, what does it mean when the current timestep vs. simulaton time is almost vertical? (shown on attachment, vertical segment located at about x=1.20E-3s)

When I pause the solver to preview the solution, it seems that this is where the water stops.

I have ran a similar configuration with the vertical segment running for about 200 timesteps and it did not change.
Attached Images
File Type: jpg Capture.JPG (40.4 KB, 33 views)
contred is offline   Reply With Quote

Old   May 24, 2013, 06:22
Default
  #8
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,545
Rep Power: 97
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
This means the simulation is grinding to a halt. Something has caused the convergence to be much harder in this region. Use the post processor to find what is causing the problem.
ghorrocks is offline   Reply With Quote

Old   May 24, 2013, 10:49
Default
  #9
New Member
 
Henry
Join Date: May 2013
Posts: 6
Rep Power: 5
contred is on a distinguished road
Thank you for your help again!

It seems that the fluid miniscus stops right underneath the control device model I placed in the middle of the tube (attached).

The control model does not have the filter membrane (top and bottom of the model) so that the fluid can freely flow through.

What parameters should I change so that the simulation does not stop before flowing through the model?
Attached Images
File Type: jpg Capture.JPG (22.2 KB, 16 views)
contred is offline   Reply With Quote

Old   May 24, 2013, 19:19
Default
  #10
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,545
Rep Power: 97
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
Please post an image of the entire geometry so we can see what this device actually is.
ghorrocks is offline   Reply With Quote

Old   May 24, 2013, 22:15
Default
  #11
New Member
 
Henry
Join Date: May 2013
Posts: 6
Rep Power: 5
contred is on a distinguished road
Note that the tube is shortened for visibility.
I am trying to simulate the fluid flow through this device that contains pores at about 10 microns in diameter.
The device is placed on the middle of the capillary tube.
Attached Images
File Type: jpg Capture.JPG (26.7 KB, 18 views)
File Type: jpg 2.JPG (31.6 KB, 20 views)
contred is offline   Reply With Quote

Old   May 25, 2013, 05:08
Default
  #12
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,545
Rep Power: 97
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
Does the free surface progress form the bottom to the top, filling the tube and passing through the fine pores on the way?
ghorrocks is offline   Reply With Quote

Old   May 25, 2013, 12:36
Default
  #13
New Member
 
Henry
Join Date: May 2013
Posts: 6
Rep Power: 5
contred is on a distinguished road
Yes, and we are trying to find out if liquid will go through the device or not. If so, how much more pressure difference would we need to apply, etc.
The liquid will pass through the bottom membrane. The top membrane is mostly for evacuation purposes.
contred is offline   Reply With Quote

Old   May 26, 2013, 07:20
Default
  #14
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,545
Rep Power: 97
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
I see. In that case you are going to have to expect the simulation slows down as it hits this feature. When it hits there are all sorts of short time scale transients occurring as surface waves zip around and the flow sorts itself out again. To handle this the time step size must slow down. This is an inevitable consequence of the little gizmo you are measuring being a fraction of the size of the whole duct. Any time you have big range of sizes in CFD you are going to have a hard time.

So that means there is no problem with the small time step, you are just going to have to put up with it. Let it run for as long as it needs to run.
ghorrocks is offline   Reply With Quote

Old   February 11, 2014, 04:46
Default
  #15
New Member
 
Join Date: Feb 2014
Posts: 2
Rep Power: 0
schos is on a distinguished road
Hi

I want to simulate the rise of different liquids in a capillary under gravitation and compare the final heights.
Only the capillary is modelled without the vessel where it is dipped into.
Although following the descriptions and advices of the above posts, the calculation does not terminate and I run out of memory.

The following Warnings and Errors appear during the calculation:
+--------------------------------------------------------------------+
| ****** Notice ****** |
| A wall has been placed at portion(s) of an OUTLET |
| boundary condition (at 100.0% of the faces, 100.0% of the area) |
| to prevent fluid from flowing into the domain. |
| The boundary condition name is: Outlet. |
| The fluid name is: Air. |
| If this situation persists, consider switching |
| to an Opening type boundary condition instead. |
+--------------------------------------------------------------------+
| Mass-Liquid | 1.00 | 2.2E-16 | 2.2E-15 | 10.4 0.0E+00 OK|
+----------------------+------+---------+---------+------------------+

-> I know that one way to get rid of this warning is to refine the mesh but then the needed memory space would further increase.

+--------------------------------------------------------------------+
| ERROR #001100279 has occurred in subroutine ErrAction. |
| Message: |
| write_compressed_data: (fwrite failed) syserr:: No space left on |
| device |
+--------------------------------------------------------------------+

+--------------------------------------------------------------------+
| ERROR #001100279 has occurred in subroutine ErrAction. |
| Message: |
| iocnt: write compressed data failed |
+--------------------------------------------------------------------+

+--------------------------------------------------------------------+
| An error has occurred in cfx5solve: |
| |
| The ANSYS CFX solver exited with return code 1. No results file |
| has been created. |
+--------------------------------------------------------------------+

+--------------------------------------------------------------------+
| Warning! |
| |
| After waiting for 60 seconds, 1 solver manager process(es) appear |
| not to have noticed that this run has ended. You may get errors |
| removing some files if they are still open in the solver manager. |
+--------------------------------------------------------------------+

The only differences concerning the model compared to the above posted case are:
- length of the pipe is 25mm
- As primary fluid I use Air @ 25C with basic settings
- For the liquid I defined a new material
- density 750 kg/dm^3
- dynamic viscosity of 0.0017 Pa.s
- I further entered a specific heat capacity of 3kJ/kgK since ANSYS says it is needed...
- contact angle is 17
- interfacial tension is 0.025 N/m
- Inlet boundary condition is Total Pressure with 1 Pa
- Outlet boundary condition is Static Pressure with 0 Pa

The settings for the transient calculationa are:
- Transient for 1s
- First Update Time = 0s
- Timestep Update Freq. = 1
- Initial Timestep = 1e-8
- Max timestep =0.1
- Min timestep = 1e-8
- Target min loops = 5
- Target min loops = 3
- Timestep Dec/Inc Factors is set to standard (0.8 - 1.06)
For Initialization I set the velocities to zero and volume fraction of air to 1 since at the beginning the capillary only contains air.

The calculation was aborted after two hours when 20 transient result files had been created, each with a size of around 230 MB!
When I analyse the result files in CFX-post I see that always the min timestep was used.
Any idea how I can get rid of that problem?


Thank you very much for your help in advance!
schos is offline   Reply With Quote

Old   February 11, 2014, 04:55
Default
  #16
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,545
Rep Power: 97
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
CFX (and just about allother CFD codes as well) need exceedingly small timesteps for surface tension driven flows. You need to lower your minimum time step size so it can go as small as it needs to.

You also need more hard drive space, and that outlet backflow warning is a worry.
ghorrocks is offline   Reply With Quote

Old   February 12, 2014, 04:26
Default
  #17
New Member
 
Join Date: Feb 2014
Posts: 2
Rep Power: 0
schos is on a distinguished road
OK, so I reduced the minimum time step to 1e-12s, refined the mesh and arranged more hard drive space. The outlet backflow warning is reduced and disappears for most of the time steps. After around 250 time steps I stopped the simulation and checked the results but the liquid did not rise at all. I wonder if this is normal?
As totale inlet pressure I set 1 Pa and I only model one quarter of the tube using symmetry boundaries.
Do you think there is a problem in the model/settings or does it simply need more timesteps?
schos is offline   Reply With Quote

Old   February 12, 2014, 06:08
Default
  #18
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 12,545
Rep Power: 97
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
There are analytical solutions for capilliary flow in a tube so you should be able to estimate how much the surface will move in the time you have simulated.

And yes, it is normal for timesteps to be amazingly small for free surface simulations. You will just have to run it for zillions of time steps.
ghorrocks is offline   Reply With Quote

Reply

Tags
boundary conditions, capillary, surface tension

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ANSYS Meshing] Issue with modeling dynamic capillary rise in a capillary tube cp703 ANSYS Meshing & Geometry 13 March 22, 2013 21:11
About Some Concepts:Laminar flow, turbulent flow, steady flow and time-dependent flow Jing Main CFD Forum 5 March 2, 2013 15:02
Modeling a cross flow in a staggered tube bundle using ANSYS CFX ashraf88 CFX 3 December 16, 2012 22:27
powder flow by cfx mb.mahaki CFX 2 October 10, 2012 18:26
compressible flow in CFX! Ihsan CFX 9 January 15, 2008 19:50


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