# DirectMapped

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

 March 3, 2010, 10:34 DirectMapped #1 Member   Primoz Ternik Join Date: Apr 2009 Location: Maribor, Slovenia Posts: 65 Rep Power: 10 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

 March 3, 2010, 10:45 #2 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Deltares, Delft, The Netherlands Posts: 1,736 Rep Power: 29 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

March 3, 2010, 11:05
#3
Member

Primoz Ternik
Join Date: Apr 2009
Location: Maribor, Slovenia
Posts: 65
Rep Power: 10
Quote:
 Originally Posted by ngj 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

 March 3, 2010, 11:20 #4 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Deltares, Delft, The Netherlands Posts: 1,736 Rep Power: 29 Exactly! Have fun.

March 3, 2010, 14:50
#5
Member

Primoz Ternik
Join Date: Apr 2009
Location: Maribor, Slovenia
Posts: 65
Rep Power: 10
Quote:
 Originally Posted by ngj 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
Attached Images
 PressureCentreline.jpg (38.7 KB, 38 views) VxCentreline.jpg (24.6 KB, 28 views)
Attached Files
 DirectMapped.tar.gz (3.3 KB, 47 views)

 March 3, 2010, 16:04 #6 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Deltares, Delft, The Netherlands Posts: 1,736 Rep Power: 29 Hi Primoz Could you please tell me what solver you are using? I might have an idea. Best regards, Niels

March 3, 2010, 16:16
#7
Member

Primoz Ternik
Join Date: Apr 2009
Location: Maribor, Slovenia
Posts: 65
Rep Power: 10
Quote:
 Originally Posted by ngj 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

 March 3, 2010, 17:41 #8 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Deltares, Delft, The Netherlands Posts: 1,736 Rep Power: 29 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

March 3, 2010, 18:27
#9
Member

Primoz Ternik
Join Date: Apr 2009
Location: Maribor, Slovenia
Posts: 65
Rep Power: 10
Quote:
 Originally Posted by ngj 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

 March 4, 2010, 02:24 #10 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Deltares, Delft, The Netherlands Posts: 1,736 Rep Power: 29 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

March 4, 2010, 09:34
#11
Member

Primoz Ternik
Join Date: Apr 2009
Location: Maribor, Slovenia
Posts: 65
Rep Power: 10
Quote:
 Originally Posted by ngj 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
Attached Images
 PressureDrop_Backward.jpg (38.3 KB, 28 views) PressureDrop_CrankNicholson.jpg (38.7 KB, 26 views) PressureDrop_Euler.jpg (38.3 KB, 24 views)
Attached Files
 VxCentreline_TimeDiffScheme.pdf (17.2 KB, 20 views) VxCentreline_OffsetValue.pdf (80.2 KB, 20 views)

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post jens_klostermann OpenFOAM Running, Solving & CFD 33 May 3, 2013 02:45 Kr_kim OpenFOAM Running, Solving & CFD 0 February 8, 2010 19:12 Kr_kim OpenFOAM Bugs 2 February 4, 2010 18:36 matthias OpenFOAM 0 November 13, 2009 18:00 turnow OpenFOAM 0 August 13, 2009 06:35

All times are GMT -4. The time now is 08:59.