CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   DirectMapped (https://www.cfd-online.com/Forums/openfoam/73272-directmapped.html)

ternik March 3, 2010 09:34

DirectMapped
 
Hi Foamers,

I need a help on the following - I would like to calculate fully developed (from inlet to outlet) channel flow (Hagen-Poiseuille) of non-Newtonian fluid for a given mass flow rate (actually for a given average velocity, since I know the channel height and density of a fluid). Is the DirectMapped type of boundary condition for a velocity the only choice for this (for Carreau-Yasuda non-Newtonian fluid there is no theoretical experssion for fully developed velocity profile)? If so, what is the meaning of offset (0.05 0 0) (I looked for this example in oodles/pitzDailyDirectMapped tutorial?

Thanks in advance!

Cheers,
Primoz

ngj March 3, 2010 09:45

Hi Primoz

The offset-vector states in what direction and how far away from the given boundary patch data should be extracted and mapped back onto the given patch.

Best regards,

Niels

ternik March 3, 2010 10:05

Quote:

Originally Posted by ngj (Post 248365)
Hi Primoz

The offset-vector states in what direction and how far away from the given boundary patch data should be extracted and mapped back onto the given patch.

Best regards,

Niels

Hi Niels,

thank you! So, offset (1 0 0) means that flow field (e.g. velocity) is mapped from "plane" that is 1 unit far away from inlet in x-direction?

Enjoy,
primoz

ngj March 3, 2010 10:20

Exactly!

Have fun.

ternik March 3, 2010 13:50

3 Attachment(s)
Quote:

Originally Posted by ngj (Post 248375)
Exactly!

Have fun.

Hi Niels,

sorry, but I have some "issues" with directMapped method. I have calculated (with nonNewtonianIcoFoam) flow of a Newtonian fluid in a channel (L=2, H=1) using your suggestion. The velocity looks fine (fully developed from inlet to outlet) but the pressure looks "strange" - I would expect to get the linear pressure variation from inlet to outlet (theoretical pressure drop=2.4Pa), but the situation is quite different (please see attached figures).

Can you (or someone else) make any comment, suggestions... I hope that I am doing something wrong, rather than blame the OpenFoam. For that I have also attached my case.

enjoy,
Primoz

ngj March 3, 2010 15:04

Hi Primoz

Could you please tell me what solver you are using? I might have an idea.

Best regards,

Niels

ternik March 3, 2010 15:16

Quote:

Originally Posted by ngj (Post 248408)
Hi Primoz

Could you please tell me what solver you are using? I might have an idea.

Best regards,

Niels

Hi Niels,

nonNewtonianIcoFoam!

Looking forward for your idea :)!

Enjoy,
Primoz

ngj March 3, 2010 16:41

Hi

It was something else than I suspected, however I found out that the error lies with the use of CrankNicholson. Using either Euler or backward yielded good results. You might consider reporting it as a bug in the CrankNicholson. At least it is unsatisfactory that the time scheme has such a significant effect on the result, e.g. from right to wrong.

Best regards,

Niels

ternik March 3, 2010 17:27

Quote:

Originally Posted by ngj (Post 248430)
Hi

It was something else than I suspected, however I found out that the error lies with the use of CrankNicholson. Using either Euler or backward yielded good results. You might consider reporting it as a bug in the CrankNicholson. At least it is unsatisfactory that the time scheme has such a significant effect on the result, e.g. from right to wrong.

Best regards,

Niels

Hi,

thank for your tip! I will run some tests tomorrow (using all three time schemes), document them well and put results on-line (on forum)!

One last question - do you think that the "plane" of mapping (offset value) influences results (time evolution of flow in a straight channel)? Now I was mapping from the middle of a channel and I wonder if mapping from some other axial position (e.g. closer to inlet or outlet) would yield different results?!

Cheers,
Primoz

ngj March 4, 2010 01:24

Good morning:)

Well, I do not think that the final steady-state solution will be affected by the length of the mapping zone, however the length will most certainly affect the necessary simulation time as a short zone will require longer simulation time than a longer one.
I you at some point is going to consider turbulence, the length of the mapping zone become important for the final result, at least for LES, however as long as you are in the laminar regime, there are no issues with respect to "result as a function of mapping length".

Have a good day,

Niels

ternik March 4, 2010 08:34

5 Attachment(s)
Quote:

Originally Posted by ngj (Post 248486)
Good morning:)

Well, I do not think that the final steady-state solution will be affected by the length of the mapping zone, however the length will most certainly affect the necessary simulation time as a short zone will require longer simulation time than a longer one.
I you at some point is going to consider turbulence, the length of the mapping zone become important for the final result, at least for LES, however as long as you are in the laminar regime, there are no issues with respect to "result as a function of mapping length".

Have a good day,

Niels

Hi Niels,

thank you for your time and explanations! I have just finished a study with all three differencing schemes. Results are as expected (regarding your previous post) - Euler and Backward differencing schemes yield good results, while Crank Nicholson ... See attached figures for the pressure drop (PressureDrop_Backward.png, PressureDrop_Euler.png, PressureDrop_CrankNicholson.png) and time evolution of centreline velocity (VxCentreline_TimeDiffScheme.pdf)! Please note, that the theoretical pressure drop for this case (at fully developed flow conditions) is 2.4Pa and the pressure varies (reduces) linearly with axial position!

In adition, I have also tested (possible) influence of "mapping plane" position - according to your post, there is no influence of offset value on time evolution of centreline velocity (see attached figure - VxCentreline_OffsetValue.pdf).

Thank you again!

Enjoy,
Primoz


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