CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   Stable boundaries (http://www.cfd-online.com/Forums/cfx/112999-stable-boundaries.html)

marcoymarc February 9, 2013 13:01

Stable boundaries
 
http://img805.imageshack.us/img805/1117/immagine2cm.jpg


There we go. I am struggling very hard to make my simulation converge.
Trying everything. But let me tell you the setup.

This model should represent an elementary cell for fiber resing molding. Fiber packs are modeled as porous media, whose permeability has been obtained through other simulations.
So, we have two domains here: a porous domain, which is the 4 elliptic bodies you can see, and a fluid domain. This is a multiphase flow: resin and air.
I have set up: 60kpa at inlet for fluid domain with resinVolFraction = 1.
The green area (i underlined) is a free slip wall.
Then we have symmetry all around the flow and 2 outlets, 1 for the fluid domain where static Pressure is set at 59500kpa and 1 for porous domain where static pressure is set at 10Pa.

Initialization.
While velocity field is set 0 everywhere, we have got:
FLUID Domain:
Resin Volume Fraction = 1. Pressure is 59750.

Porous Domain: Air VFraction = 1. Pressure is set at 10 Pa.

I've tried everything, very very small timesteps (10^-15); setting different reference pressures to avoid roundoff; switching off Homogeneous model, switching to opening boundaries instead of outlets. Every time i get the FINMES routine error.
Please help me i am really desperate.

Thank you.

ghorrocks February 10, 2013 05:26

Have you checked mesh quality?

My crystal ball tells me that where you have your elliptical bodies in tangent to each other you have terrible mesh quality and a complex model like this has no hope with poor mesh quality.

My recommendations:
* Do the development work (ie get the physics working and converging) on a simplified model with good mesh quality. Maybe just a single circular fibre.
* Then remodel your geometry with the horrible bits removed. Maybe fill in the tangent edges with fillets, or separate the fibres by a few element edge lengths. Or maybe make the fibres overlap a bit so the horrible tangent faces become reasonable angles.
* Now you can apply a simulation set up which works on a geometry which has a hope of converging.

marcoymarc February 10, 2013 08:01

Ghorrocks,
i would be lost without you :D
I'm working on the simpler model right now. I'll keep the thread updated.
Thank you.

marcoymarc February 11, 2013 10:11

Quote:

Originally Posted by ghorrocks (Post 406939)
Have you checked mesh quality?

My crystal ball tells me that where you have your elliptical bodies in tangent to each other you have terrible mesh quality and a complex model like this has no hope with poor mesh quality.

My recommendations:
* Do the development work (ie get the physics working and converging) on a simplified model with good mesh quality. Maybe just a single circular fibre.
* Then remodel your geometry with the horrible bits removed. Maybe fill in the tangent edges with fillets, or separate the fibres by a few element edge lengths. Or maybe make the fibres overlap a bit so the horrible tangent faces become reasonable angles.
* Now you can apply a simulation set up which works on a geometry which has a hope of converging.


http://img252.imageshack.us/img252/3471/immagine3sx.jpg

Ghorrocks, hi again.
I followed your guidelines, and this is the simplest geometry i could think of.
I have some questions for you, and thanks again for your help.
When i use small pressure at Fluid inlet - outlet (10pa - 5pa with 7pa Initial Condition over the fluid domain), while holding the porous outlet and its initialization at 0 pa, i can make my sim work with a timestep of 10^-6. If i raise pressure values at fluid inlet - outlet (1000pa - 950pa with 975 Pa initial condition) i need a much smaller timestep to avoid overflow error (10^-12s).

- Do you think it's a normal issue?
- Is it due to bad boundary/initial conditions?
- What do you think about solving a similar problem but in steady state and switching my porous domain in a solid domain and using steady state fluid pressure as a robust intial condition (over fluid domain) for porous/fluid simulation? Can i do that? In which way can i pass the pressure field of a steady state to my simulation?
- Would a finer mesh help me to raise my timestep, keeping the sim work, even at higher pressures?

Thank you.

ghorrocks February 11, 2013 18:13

It means you probably (almost certainly actually) have not correctly set up the basic flow. The basic flow is the pressure difference pushing against losses from porosity. I would do an even simpler model, just flow in a box with no fibre, so you can get this part working properly.

Yes, your idea about a better initial condition sounds sensible. I would try that. When you use a steady state run to initialise a transient run all relevant variables (velocity, pressure, temperature, volume/mass fractions) are transferred over.

No need for finer meshes yet. Finer meshes are harder to get working because they run slower and have less dissipation and are therefore harder to converge. Get the simple coarse mesh ones running reliably before you refine the mesh.

marcoymarc February 11, 2013 20:51

Quote:

Originally Posted by ghorrocks (Post 407252)

Yes, your idea about a better initial condition sounds sensible. I would try that. When you use a steady state run to initialise a transient run all relevant variables (velocity, pressure, temperature, volume/mass fractions) are transferred over.


What happens if i solve my steady state with a SOLID domain instead of a porous domain and then try to use that for my transient POROUS sim? I mean What happens to initial conditions? My guess is that ansys Uses initial conditions for the fluid domain from the steady state and initial conditions for porous domain from my initial setup? Is this a good idea? I Think pressure field in fluid domain should be' similar either if in contact with a solid or a porous domain.. Was i clear? Sorry for my poor english.

ghorrocks February 12, 2013 07:09

If you initially run a solid domain then the temperature field will be mapped over but velocity and pressure will be taken from your CCL initial conditions as they are undefined.

marcoymarc February 25, 2013 09:09

Quote:

Originally Posted by ghorrocks (Post 407365)
If you initially run a solid domain then the temperature field will be mapped over but velocity and pressure will be taken from your CCL initial conditions as they are undefined.

Ghorrocks i've refined my model eliminating those orrible bits. But i can't get it converging even on the simpler model. Can you help me please? According to your experience is this physic setup correct? (i have problems even with very very small tsteps)

ghorrocks February 25, 2013 18:49

Sure, post an image of the geometry and attach the CCL and we can have a look.

cdegroot February 25, 2013 21:40

Are both inlet and outlet boundaries specified pressure? That's not a good idea. Maybe you can try a periodic condition with a specified pressure difference.

marcoymarc February 26, 2013 14:22

http://img812.imageshack.us/img812/6124/immagine3ow.jpg
Ghor, as you said, i made fibers overlap to help CFX converging.

FLUID DOMAIN
Inlet 1000 Pa, static pressure, Resin VF = 1 air VF = 0
Outlet 900 Pa, static pressure

Inizialization
Rvf = 1, pressure = 950Pa


POROUS DOMAIN
No inlet, we have a free slip wall
Outlets 0 Pa, static pressure

Initialization
AirVf=1, Pressure = 10 Pa


The model is homogeneous. Starting from a steady state to have a robust initial guess, especially for Resin Pressure and Velocity, doesn't seem to help.

If i use lower pressure at inlet (say 50 pa) and outlet (40 Pa) i can make my simulation work. When they rise it's impossibile even with 10^-14s timesteps. (recall i used a 10^-5 timestep for lower pressures)

Do you think this setup is reasonable?

@Chris
Thanks for your help, i'll make a try.

cdegroot February 26, 2013 14:36

From the Modelling Guide:

2.3.2. Recommended Configurations of Boundary Conditions

The following combinations of boundary conditions are all valid configurations commonly used in ANSYS CFX. They are listed from the most robust option to the least robust:

Most Robust: Velocity/mass flow at an inlet and static pressure at an outlet. The inlet total pressure is an implicit result of the prediction.

Robust: Total pressure at an inlet and velocity/mass flow at an outlet. The static pressure at the outlet and the velocity at the inlet are part of the solution.

Sensitive to Initial Guess: Total pressure at an inlet and static pressure at an outlet. The system mass flow is part of the solution.

Very Unreliable: Static pressure at an inlet and static pressure at an outlet. This combination is not recommended, as the inlet total pressure level and the mass flow are both an implicit result of the prediction (the boundary condition combination is a very weak constraint on the system).

Not Possible: Total pressure cannot be specified at an outlet. The total pressure boundary condition is unconditionally unstable when the fluid flows out of the domain where the total pressure is specified.


As you can see it is not recommended to set up the problem the way you have. It will be very difficult to get convergence. I would try the periodic condition first as I mentioned. Failing that you would need to use one of the first two options listed above which are much more stable.

marcoymarc February 27, 2013 06:10

I've just tried both a periodic condition and a bulk mass flow at inlet (i set it at 9*10^-5 kg/s, value i obtained from a steady state simulation with a solid domain instead of porous domain) with no result.
Rising Air.pressure at start close to Resin.pressure helps me getting 2-3 timesteps further but i can't reach convergence.

What sounds strange is that i get always "warning, a wall has been placed instead of a OUTLET etc"; i did not really expect to see a reflux at outlet... Kinda confused

ghorrocks February 27, 2013 06:53

This warning is important - have a look in the post processor where the reflux is. Is it realistic? If not then you have a convergence problem to fix. If it is realistic then you are not using an appropriate boundary condition.

marcoymarc February 27, 2013 09:56

Ok. Prolly i found the issue.
(Probably) The instability is caused by Porous and Fluid Outlets which have such different pressures (O(10^2)Pa and O(1)Pa) lying on the same plane. Porous Outlet is acting like a blackhole...
Infact, when i use the same pressure level for Outlets and domains (at start), i can reach 50 timesteps easily.

Now; i REALLY want the air.pressure to be far smaller than resin's. Because it's this pressure gradient that causes resin flow trough porous domain. How can i achieve this? Guess that Porous outlet pressure MUST be that small to have both an outflow and a gradient between fluid/porous media. It should be also the best choice to represent my problem...
do you think it is really so?
Any ideas on achieving convergence or setting up better my boundaries?

cdegroot February 27, 2013 15:12

I may have a suggestion. It sounds like the flow is mostly parallel to the fluid-porous interface with some small component of the flow going through the interface, right?

The interface condition implemented in CFX holds the total pressure constant through the interface. Since the flow directly on the porous side is faster by a factor 1/porosity (such that the superficial velocity is the same on either side) this causes a jump in static pressure across the interface. This makes a lot of sense for flow straight through the interface, but not so much for flow parallel to the interface and has been known to cause convergence problems.

There are a couple things you can do. First off, there is an expert parameter "porous cs discretisation option" that you can set to a value of "1" instead of "2". This will just hold the static pressure constant across the interface and forget about the jump in static pressure. This option has much better convergence properties.

There may be one other option as well, depending on which version of CFX you are running. Setting the expert parameter above to "3" will give the pressure jump for the flow component into the interface and no jump for the component parallel to the interface. This is the ideal condition, however it is probably a beta feature in your version of CFX and you probably will have to edit the CCL directly to turn it on. Keep in mind that it is a beta feature and would not be fully tested. Let me know if you want more details on this option.

marcoymarc February 28, 2013 08:04

Chris i tried the expert paramater, again with no result.
Take a look at this:
i used weak boundary conditions (static pressure both at inlet and outletS), but using the same pressure level for Outlets and fluids at start.

http://img19.imageshack.us/img19/3088/immagine3vxr.jpg

Substantially, i would expect to see something like this, but with air.pressure much lower, to have a more consistent resin.massflow into porous domain.Recall Air.VF is 1 inside porous domain at start.

NOTE: in this simulation porous cs expert paramater value was set at 1. Should have no problem achieving this with default value.

This is really struggling me. I have been working on this for such long time... and i need it since it's my thesis work. :>

Anyway, thank you all for your kindness.

marcoymarc February 28, 2013 08:15

this is the way i expect to see pressure in my simulation:
http://img842.imageshack.us/img842/6577/immagineqix.jpg
With this setup i can only achieve 1 timestep... The steamlines are such strange.

cdegroot February 28, 2013 08:26

Lets take a small step back and try running this as a single phase flow. Try with just air and set the expert parameter to 1. Use either periodic boundary conditions or a massflow inlet/pressure outlet. Take the multiphase out of the picture for now so we can see if that is the major issue.

marcoymarc March 1, 2013 05:56

Quote:

Originally Posted by cdegroot (Post 410634)
Lets take a small step back and try running this as a single phase flow. Try with just air and set the expert parameter to 1. Use either periodic boundary conditions or a massflow inlet/pressure outlet. Take the multiphase out of the picture for now so we can see if that is the major issue.

There we go!!!
The simulation works fine when i use a single phase; and that's the result after 100 timesteps. The best was that i could push up till 10^-5s tstep with no problem at all!
And this is exactly what i'd expect to see in 2 phase sim...
Ok, now what's the point for you??
I can see the light anyway, thank you!

http://img405.imageshack.us/img405/1826/immaginemnw.jpg


All times are GMT -4. The time now is 16:42.