Tutorial 2 _ yes and no

A subforum specific to the development of the OpenFoam-based workbenches ( Cfd https://github.com/qingfengxia/Cfd and CfdOF https://github.com/jaheyns/CfdOF )

Moderator: oliveroxtoby

ljb
Posts: 43
Joined: Tue Sep 04, 2018 3:56 pm

Re: Tutorial 2 _ yes and no

Post by ljb »

OK

This time it finished the Write process and the Run process.

And my results look suspiciously like the results shown in the tutorial.

What did I do wrong? (Seriously)
(And why does the gmsh solver do it differently?) (A tutorial, perhaps?)

Was it the mesh point location? Or or the input velocity? Or both? Or ...

As I like to mention, I'm new FC/cfdOF. But I'm also relatively new to CFD in general. Do you have any recommendations for tutorial material (especially FC centric) that might be of benefit to me?
I'm an old fart. Retired. Engineer and physicist. Programs like this were the stuff of dreams when I and my colleagues were trying to figure out if an idea was worth pursuing. Literally - we had long late night discussions about where computers and software were going.

It has been said that the reality never matches the fantasy. The stuff you guys have produced poses a serious challenge to that meme.

And I cannot say enough about the support you guys are providing. I look back on the good old days - the days when I could walk down the hall and ask a coworker "WTF?" - and I now think that this might almost be better.

Learning has always been my passion, and physics was and is my first love (just don't tell Tricia - but I suppose she already suspects, after all we met in a physics class). The internet is the most amazing thing I've experienced in a life full of amazing things. I used to dream of a sugar-daddy (well actually a sugar-mommy) that would put me through school for the rest of my life.

This is the equivalent.
LB
thschrader
Veteran
Posts: 3157
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Tutorial 2 _ yes and no

Post by thschrader »

ljb wrote: Wed Sep 26, 2018 4:59 pm And my results look suspiciously like the results shown in the tutorial.
Obviously your pizza was useful for cfd...can you post the recipe? :D
Tutorials openfoam (very useful, can be done with the bluecfd-core terminal):
https://www.youtube.com/channel/UCjdgpu ... Vvw/videos
FC-related (the only ones...):
https://www.youtube.com/watch?v=8A9GewANqh8
https://opensimsa.github.io/training.html
ljb
Posts: 43
Joined: Tue Sep 04, 2018 3:56 pm

Re: Tutorial 2 _ yes and no

Post by ljb »

So, I found some of my answers. I went back to the file I sent to thschrader and made the discussed changes ...

Moving the mesh point off of zero seems to be the thing that keeps the app from crashing. I tried this first, without adjusting the inlet velocity. No crash, but the pressure changes were ... strange.

After I added the velocity adjustment, the results in Paraview, although much better, are still not like what I get with the 'new' version provided by thschrader (which are essentially the same as in the tutorial). I can now see the central small cube, but the the pressure changes extend well outside it in both directions.

My intuition says this is NOT the right answer. The porous region is the only physical reason for a pressure change.

Can this be the difference between my computer and your computer? I sure hope you can give me an emphatic NO for an answer. (And a why.)

???
LB
User avatar
oliveroxtoby
Posts: 837
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Tutorial 2 _ yes and no

Post by oliveroxtoby »

ljb wrote: Wed Sep 26, 2018 4:59 pm OK

This time it finished the Write process and the Run process.

And my results look suspiciously like the results shown in the tutorial.

What did I do wrong? (Seriously)
snappyHexMesh requires a point to be specified inside the volume to be meshed - otherwise it meshes outside. I think this was your main issue.
I'm an old fart. Retired. Engineer and physicist. Programs like this were the stuff of dreams when I and my colleagues were trying to figure out if an idea was worth pursuing. Literally - we had long late night discussions about where computers and software were going.

It has been said that the reality never matches the fantasy. The stuff you guys have produced poses a serious challenge to that meme.

And I cannot say enough about the support you guys are providing. I look back on the good old days - the days when I could walk down the hall and ask a coworker "WTF?" - and I now think that this might almost be better.

Learning has always been my passion, and physics was and is my first love (just don't tell Tricia - but I suppose she already suspects, after all we met in a physics class). The internet is the most amazing thing I've experienced in a life full of amazing things. I used to dream of a sugar-daddy (well actually a sugar-mommy) that would put me through school for the rest of my life.

This is the equivalent.
Thank you for your enthusiasm!
Please provide all the information requested in this post before reporting problems with CfdOF.
thschrader
Veteran
Posts: 3157
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Tutorial 2 _ yes and no

Post by thschrader »

ljb wrote: Wed Sep 26, 2018 7:24 pm My intuition says this is NOT the right answer. The porous region is the only physical reason for a pressure change.
Your darcy-coefficients are zero ==> no porosity, no pressure drop.
Use 0,001 1/mm for Inertial_f values.
inertial_f.JPG
inertial_f.JPG (41.61 KiB) Viewed 1434 times
darcy_coeffs.JPG
darcy_coeffs.JPG (27.38 KiB) Viewed 1434 times
ljb
Posts: 43
Joined: Tue Sep 04, 2018 3:56 pm

Re: Tutorial 2 _ yes and no

Post by ljb »

Thanks again, thschrader,

Really?

Right now I'm a bit inebriated. But I would swear that my original file (I'm looking at it now) has these values at 0.1 for each axis. I was going to change them and see if it made a difference.
** Inertial (f)

Well ... wait ... I don't actually see a decimal point between the zero and the one.
Just a space.
I have a magnifying glass, so I'm very sure.

Viscous (d) values are the same magnitude, but units are inverse mm^2. And they also have a space between the zero and the one, rather than a radix character.

Strange. Is this a European thing? Or an attempt to generalize between us? Not criticizing, just asking. I like some of the stuff that comes from Europe. You guys are kind of cool.

I'm about to crash, so I will have to look at this again in the morning.

LB
thschrader
Veteran
Posts: 3157
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Tutorial 2 _ yes and no

Post by thschrader »

ljb wrote: Wed Sep 26, 2018 9:45 pm I don't actually see a decimal point between the zero and the one.
Just a space.
Hi ljb,
please have a look at my input-dialog. The tutorial use 1/m as dimension,
so you must type 0,001 1/mm when using FC-standard-units (check your unit system
in Edit/Preferences/General/Units). You must use a comma as separator.
When writing the case, FC generates the correct value of 1.0 in the case file.
The 1/mm in the dialog is NOT the value, it is the dimension.
The dimension of d = 1/mm^2 and f = 1/mm is due to darcy-forchheimer law,
in the formula is a linear and a quadratic term, see here
https://forum.freecadweb.org/viewtopic.php?f=37&t=29813
bed-time...
BTW: after writing the case, always check the case files before pressing run-button
myInput1.JPG
myInput1.JPG (24.74 KiB) Viewed 1425 times
tutorial.JPG
tutorial.JPG (25.67 KiB) Viewed 1425 times
case_file.JPG
case_file.JPG (23.76 KiB) Viewed 1425 times
ljb
Posts: 43
Joined: Tue Sep 04, 2018 3:56 pm

Re: Tutorial 2 _ yes and no

Post by ljb »

Thanks thschrader,

Now that I see it, it is obvious. I'm used to seeing, and thinking of, things like inverse meters and inverse meters squared as m^-1 and m^-2.

Seems like I've seen it expressed your way before, but that was a while back. And ... the definition of m^-1 is literally 1/m.

Units are critical, but sometimes we tend to gloss over them. Bad habits can be hard to break.

Units are the primary separator between physical world science (where math is a tool box) and conceptual world mathematics (where math is a science in its own right). Both are important, and often beautiful. But we need to keep them separate in our minds.

A day when I learn, or re-learn, something is a good day.
ljb
Posts: 43
Joined: Tue Sep 04, 2018 3:56 pm

Re: Tutorial 2 _ yes and no

Post by ljb »

Thank you oliver,
snappyHexMesh requires a point to be specified inside the volume to be meshed - otherwise it meshes outside. I think this was your main issue.
The default point location is 0,0,0, which is on the surface of the volume. But not inside the volume.

I'm thinking that 0,0,1 would work as well as 100,200,300.

?

LB
ljb
Posts: 43
Joined: Tue Sep 04, 2018 3:56 pm

Re: Tutorial 2 _ yes and no

Post by ljb »

OK - 0,0,1 does not work.
But 1,1,1 does.
And 0,1,1 does not.

Interesting.

Thanks to both of you.
On to my next adventure.
Post Reply