heat transfer and fluid flow problem with density = f(T)

General discussion about Elmer
Post Reply
sebastien ROUQUETTE
Posts: 97
Joined: 05 Nov 2011, 16:50
Antispam: Yes
Location: Nimes, France

heat transfer and fluid flow problem with density = f(T)

Post by sebastien ROUQUETTE »

Well... i have a question about a problem occuring in my simulation... sometimes it happens and sometimes no! In this one; it appears so...
I am simulating a welding process with the heat transfer and navier stokes solvers.
If i use a temperature dependent density ... the system is totally unstable since the first iteration (i tried step time from 0.5 to 0.005s).
If i use a constant density it works!!!!!
FOr running it, compile the fortran file before. The mesh was obtained with gmsh. I use 1st order polynom for the FEM.
I may have forgotten some of my basis in simulating fluid dynamics.
What i don't understand is that i have a meshgrid that works perfectly with the temeprature dependent density... exactly the same... i have the same sif file... but doesn't work. I just wanted to increase the fluid domain in order to simulate a larger weld pool?
It seems that the pressure at the first iteration takes large values... and i don't see how to fix it...
Brief.. if somebody has a clue of my mistake?
cheers
Attachments
gtaw2Daxi_C.rar
(319.41 KiB) Downloaded 333 times
Rouquette Sébastien
University of Montpellier / Mechanical and Civil Engineering Lab. / Welding Group
raback
Site Admin
Posts: 4857
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: heat transfer and fluid flow problem with density = f(T)

Post by raback »

Hi Sebastian

Didn't look at your case. This is just guessing. Do you prescribe velocity on all BCs? If the flow is incompressible the integral of mass flux over all BCs must be zero. If you play with density you might introduce a disbalance which introduces spurious pressure peaks. That's the only way of the equation may in such a case have a numerical solution. So the solution would be to relax some BC or introduce some compressibility - if this is the reason.

-Peter
sebastien ROUQUETTE
Posts: 97
Joined: 05 Nov 2011, 16:50
Antispam: Yes
Location: Nimes, France

Re: heat transfer and fluid flow problem with density = f(T)

Post by sebastien ROUQUETTE »

Effectively all my boudanries of the fluid domain are quite constrained:
this fluid domain is described by 3 boubdaries (looks like a triangle domain but one edge is a spline line).
Where on the symmetry axis U=0, on the top surface V=0 et the spline line is in contact with a solid domain so i applied no slip conditions (U=0 and V=0).

Yesterday evening i changed or applied Pressure = 0.0 on a boundary in the solid domain but this one is in contact with one boundary of the fluid domain so they have one point in common...
Finally it stabilized it and worked!!!

I knew this trick from another software.. in order to get a stable solution. But in this other software i was constraining only the point to zero pressure and not all a boundary in the solid just nearby the fluid domain.

I will have a look to your strategy because i'm not statisfied of mine.

I attached the previous file with this boundary condition number 2 for the pressure.

Cheers and thank you for you reply
Attachments
gtaw2Daxi.rar
(328.85 KiB) Downloaded 360 times
Rouquette Sébastien
University of Montpellier / Mechanical and Civil Engineering Lab. / Welding Group
sebastien ROUQUETTE
Posts: 97
Joined: 05 Nov 2011, 16:50
Antispam: Yes
Location: Nimes, France

Re: heat transfer and fluid flow problem with density = f(T)

Post by sebastien ROUQUETTE »

finally.... it is not working for all the step times.
Even my trick or the Compressible assumption... around time 4.8s / 4.9s my solution does not converge... i don't see where is the singularity but there is probably something that i don't see! Or i may reach a critical fluid velocity or pressure.. i'll try to find out.
So see you sooner or later for more news on my problem.
Rouquette Sébastien
University of Montpellier / Mechanical and Civil Engineering Lab. / Welding Group
xborras7
Posts: 37
Joined: 02 Sep 2013, 21:44
Antispam: Yes

Re: heat transfer and fluid flow problem with density = f(T)

Post by xborras7 »

Hej gents,

I am developing a different case but I will post it here since it matches with the title.

I am studying the buffer space of an 2 cylinders engine. The gas moving forward and backward on the buffer space can be studied as a thermal flow (check snaps attached for an easier understanding).

To start, and since there in not a robust moving mesh in Elmer, I am running stationary simulations at different piston positions (viewtopic.php?f=3&t=3477).
Therefore the BC velocities correspond to a specific cranckshaft rotation. For example the one I attach is a 275 degrees cranckshaft rotation (not important for solving the problem).

So I coupled Heat Transfer and Navier Stokes Solvers. It is a compressible perfect gas. I defined a temperature depednent viscosity too (Sutherland Law).

My problem comes when defingin the BCs. It we can simplify the problem to just 3 different boundaries:

BC1: Piston 1 boundary
Velocity = Piston 1 Velocity
Temperature = Piston 1 Temperature
BC2: Piston 2 boundary.
Velocity = Piston 2 Velocity
Temperature = Piston 2 Temperature
BC3: Buffer Walls
Velocity = Null
Heat Transfer = Adiabatic

From my own trials:

A) when I fix the velocity of one piston and I let the othe one not restricted: no problem, it converges. I get velocities with a similar magnitude to the ones I expect however I am not deifining any pressure so I beleive I am not being accurate since my buffer is pressurized.

B) when I fix the velocities of both pistons: it does not converge. I think it is already mentioned on the previous post.

C) when I fix the velocity of one piston and the pressure on the other one: it does not converge.

My concern comes because of the pressure. If my buffer is pressurized I need to define some kind of pressure in order to trust my results:

My questions:
a) presure BC, as explained in C. (however I am not suceeding), any recommendation?
b) Some softwares allow to define a "static reference pressure" so the dynamic pressure oscilates over it. Is there something like this?
c) When plotting pressure with a compressible fluid model (perfect gas); which is the pressure I get? (you can see it in the pictures attached). Some softwares relate it to density, Elmer does it? Any help to understand it?
Attachments
streamline_pressure.png
(221.07 KiB) Not downloaded yet
pressure.png
(77.74 KiB) Not downloaded yet
glyph_pressure.png
(234.96 KiB) Not downloaded yet
Last edited by xborras7 on 13 Oct 2014, 19:07, edited 1 time in total.
xborras7
Posts: 37
Joined: 02 Sep 2013, 21:44
Antispam: Yes

Re: heat transfer and fluid flow problem with density = f(T)

Post by xborras7 »

I also attach the SIF file ;) I believe this kind of simulation is useful for many applications.
Attachments
temp_t4_001.sif
SIF file
(5.47 KiB) Downloaded 366 times
raback
Site Admin
Posts: 4857
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: heat transfer and fluid flow problem with density = f(T)

Post by raback »

Hi Xavier,

Really nice case you have there! Now the standard formulation of Elmer does not much like that "Pressure" is set directly. Therefore the "External Pressure" should work better.

Now your pressure gradients are quite extreme. As you have the Pgas=50 bar as a parameter to play, have you tried to increase it gradually from 1. For example, do you get a solution with 1.1 bar? There should be a pressure so small that the equation is almost linear and therefore should be easier to find a solution. Then one could perhaps gradually increase the pressure to obtain a solution for the more nonlinear problem.

-Peter
xborras7
Posts: 37
Joined: 02 Sep 2013, 21:44
Antispam: Yes

Re: heat transfer and fluid flow problem with density = f(T)

Post by xborras7 »

Hej Peter,

I followed your adivce and it makes more sense now (check open.rar):
- 10 bars
- 100 bars

Code: Select all

External Pressure = $ -P_gas
Thanks Peter

As expected, I increased the complexity...

Using the same SIF file (same BC, same Material,... everything the same) I used a different mesh corrsponding to a critical crank position (bottom dead centre of one of the pistons. When the piston is at the BDC the piston skirt almost closes the connection to the buffer space so the gas velocity flowing through the gap gets higher.

I could run the case however the results make me believe something is wrong (check small_gap.rar).

a) Whatever is the Pressure BC condition I impose on the piston; the pressures I am obtain are the one you see on the small_gap.rar.
(-18 to 40 Pascals).Always the same pressure difference independently of the BC I impose?

b) I was expecting a difference before and after the piston skirt: high velcoity, high pressure difference... not an important temeprature change? that concerns me.

c) Elmer gives Absolute Pressure right?

Tack igen!

/Xavi
Attachments
small gap.rar
t1
(91.16 KiB) Downloaded 320 times
open.rar
t4
(208.73 KiB) Downloaded 301 times
Post Reply