CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Creating a flow geometry with domains with different porosity

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 3, 2007, 11:37
Default Dear OpenFOAMers I am a rathe
  #1
New Member
 
Arkasshka
Join Date: Mar 2009
Location: Erlangen, Bayern, Germany
Posts: 16
Rep Power: 17
arkasshka is on a distinguished road
Dear OpenFOAMers
I am a rather new in OpenFOAM. So, my question could seem a little bit silly, but could you help me with a problem? I would like to set the following flow geometry:
__________________________________________
|____________|_________|_________|________|
|_inlet_______|_porous___|porous____|_outlet__|
|_domain_____|domain A__|domain B__|_domain_|
|____________|_________|_________|________|

Porous domains A and B should have different porosity and pressure drop. What mesh software is better use for this purpose? How can I split the flow geometry on four domains with minimal efforts?
Thank you very much for your help.
arkasshka is offline   Reply With Quote

Old   December 3, 2007, 13:27
Default Beginning with OF 1.3 there is
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Beginning with OF 1.3 there is the possibility in blockMesh to assign each block to a region. It is not described in the UserGuide, I think, but a description how to do this can be found at
http://openfoamwiki.net/index.php/Co...ckMeshWithSets
(don't, don't, don't try to download and compile the program found there)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   December 4, 2007, 04:44
Default Hi Bernard Thank you very muc
  #3
New Member
 
Arkasshka
Join Date: Mar 2009
Location: Erlangen, Bayern, Germany
Posts: 16
Rep Power: 17
arkasshka is on a distinguished road
Hi Bernard
Thank you very much for your help. Is it possible to create such geometry by using ICEM by exporting mesh is a some format?
arkasshka is offline   Reply With Quote

Old   December 4, 2007, 05:48
Default Sorry. Have no experience with
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Sorry. Have no experience with ICEM. It IS possible using Gambit (assign fluid regions, export as a Fluent-Mesh and convert with fluentMeshToFoam using the -writeZones option). Whether something similar is possible using ICEM, somebody else has got to tell you)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   December 4, 2007, 10:31
Default Hi Bernhard Thank you for the
  #5
New Member
 
Arkasshka
Join Date: Mar 2009
Location: Erlangen, Bayern, Germany
Posts: 16
Rep Power: 17
arkasshka is on a distinguished road
Hi Bernhard
Thank you for the advice. Still, there is a small problem. I do the following: I generate a mesh in ICEM, then export to the Fluent-Mesh. Then I do fluentMeshToFoam, but the file cellZones does not contain any domains. Besides, I have a output, which informs me about undefined faces.
arkasshka is offline   Reply With Quote

Old   December 4, 2007, 16:12
Default If you used the -writeZones op
  #6
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
If you used the -writeZones option, then I don't know.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   December 5, 2007, 04:43
Default Hi Bernhard Nevertheless, tha
  #7
New Member
 
Arkasshka
Join Date: Mar 2009
Location: Erlangen, Bayern, Germany
Posts: 16
Rep Power: 17
arkasshka is on a distinguished road
Hi Bernhard
Nevertheless, thank you for help with mesh. Basically the geometry is not so complicated, so I have done the mesh with the blockMesh. But another small problem appears: I use funkySetFields and I have a error output:


iwsta019@woody1:run>funkySetFields . Porous_Flow_Two_regions -field U -expression 'vector(0,0,0)' -time 0
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.4.1 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : funkySetFields . Porous_Flow_Two_regions -field U -expression vector(0,0,0) -time 0
Date : Dec 05 2007
Time : 09:36:01
Host : woody1
PID : 19735
Root : /home/woody/iwst/iwsta019/OpenFOAM/iwsta019-1.4.1/run
Case : Porous_Flow_Two_regions
Nprocs : 1
Create time

#0 Foam::error::printStack(Foam:stream&) in "/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFO AM.so"
#1 Foam::sigSegv::sigSegvHandler(int) in "/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFO AM.so"
#2 ?? in "/lib64/tls/libc.so.6"
#3 std::string::_Rep::_M_is_leaked() const in "/home/woody/iwst/iwsta019/OpenFOAM/linux64/gcc-4.2.1/lib64/libstdc++.so.6"
#4 std::string::_Rep::_M_grab(std::allocator<char> const&, std::allocator<char> const&) in "/home/woody/iwst/iwsta019/OpenFOAM/linux64/gcc-4.2.1/lib64/libstdc++.so.6"
#5 std::string::assign(std::string const&) in "/home/woody/iwst/iwsta019/OpenFOAM/linux64/gcc-4.2.1/lib64/libstdc++.so.6"
#6 Foam::Time::setTime(Foam::instant const&, int) in "/home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFO AM.so"
#7 main in "/home/woody/iwst/iwsta019/OpenFOAM/iwsta019-1.4.1/applications/bin/linux64GccDP Opt/funkySetFields"
#8 __libc_start_main in "/lib64/tls/libc.so.6"
#9 std::__throw_logic_error(char const*) at ../sysdeps/x86_64/elf/start.S:116
Segmentation fault

Do you have any idea about it? :-)
arkasshka is offline   Reply With Quote

Old   December 5, 2007, 13:42
Default Hi! No idea. The call to se
  #8
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi!

No idea. The call to setTime appears in the code before any of the real funky stuff ;) happens so I think my code is not to blame (but I wish I had an euro for every time I said that and then it was my fault). I suspect a problem with the case. Have you tried to use any other utilities (checkMesh for instance) on that case?

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   December 6, 2007, 04:25
Default Hi Bernhard I absolutely do n
  #9
New Member
 
Arkasshka
Join Date: Mar 2009
Location: Erlangen, Bayern, Germany
Posts: 16
Rep Power: 17
arkasshka is on a distinguished road
Hi Bernhard
I absolutely do not want to blame funky staff.:-) I am sure that it is a very nice tool. I think you are right: the problem with my case. That is exactly what I am trying to understand. :-) I have installed OpenFOAM 1.4 compiled from sources and performed the checkMesh. The checkMesh gives reasonable output as I think:

iwsta019@woody1:run>checkMesh . Porous_Flow_Two_regions
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.4 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : checkMesh . Porous_Flow_Two_regions
Date : Dec 06 2007
Time : 09:13:01
Host : woody1
PID : 11584
Root : /home/woody/iwst/iwsta019/OpenFOAM/iwsta019-1.4.1/run
Case : Porous_Flow_Two_regions
Nprocs : 1
Create time

Create polyMesh for time = constant

Time = constant
Boundary definition OK.


Number of points: 33516
edges: 96915
faces: 93400
internal faces: 86600
cells: 30000
boundary patches: 3
point zones: 0
face zones: 0
cell zones: 4

Checking topology and geometry ...
Point usage check OK.

Upper triangular ordering OK.

Topological cell zip-up check OK.

Face vertices OK.

Face-face connectivity OK.


Basic topo ok ...

Checking patch topology for multiply connected surfaces ...

Patch Faces Points Surface
wals 6000 6080 ok (not multiply connected)
inlet 400 441 ok (not multiply connected)
outlet 400 441 ok (not multiply connected)


Patch topo ok ...
Topology check done.

Domain bounding box: min = (0 0 0) max = (0.19 0.01 0.01) meters.

Checking geometry...
Boundary openness in x-direction = 9.14796e-20
Boundary openness in y-direction = -7.98091e-17
Boundary openness in z-direction = -8.00256e-17
Boundary closed (OK).
Max cell openness = 4.23516e-22 Max aspect ratio = 1.64012. All cells OK.

Minumum face area = 2.5e-07. Maximum face area = 3.33333e-06. Face area magnitudes OK.

Min volume = 2.5e-10. Max volume = 1.66667e-09. Total volume = 1.9e-05. Cell volumes OK.

Mesh non-orthogonality Max: 0 average: 0
Non-orthogonality check OK.

Face pyramids OK.

Max skewness = 2.22153e-11 percent. Face skewness OK.

Minumum edge length = 0.0005. Maximum edge length = 0.00666667.

All angles in faces are convex or less than 10 degrees concave.

Face flatness (1 = flat, 0 = butterfly) : average = 1 min = 1
All faces are flat in that the ratio between projected and actual area is > 0.8

Geometry check done.

Number of cells by type:
hexahedra: 30000
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 0
Number of regions: 1 (OK).
Mesh OK.


End

Then I use funky:

iwsta019@woody1:run>$FOAM_APPBIN/funkySetFields . Porous_Flow_Two_regions -field p -expression '0' -time 0
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.4 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : /home/woody/iwst/iwsta019/OpenFOAM/OpenFOAM-1.4/applications/bin/linux64Gcc4DPOp t/funkySetFields . Porous_Flow_Two_regions -field p -expression 0 -time 0
Date : Dec 06 2007
Time : 09:20:15
Host : woody1
PID : 11898
Root : /home/woody/iwst/iwsta019/OpenFOAM/iwsta019-1.4.1/run
Case : Porous_Flow_Two_regions
Nprocs : 1
Create time

#0 Foam::error::printStack(Foam:stream&)
#1 Foam::sigSegv::sigSegvHandler(int)
#2 ??
#3 std::string::_Rep::_M_is_leaked() const
#4 std::string::_Rep::_M_grab(std::allocator<char> const&, std::allocator<char> const&)
#5 std::string::assign(std::string const&)
#6 Foam::Time::setTime(Foam::instant const&, int)
#7 main
#8 __libc_start_main
#9 std::__throw_logic_error(char const*) at ../sysdeps/x86_64/elf/start.S:116
Segmentation fault

Another thing: when I try to use setFields utility it gives me:

--> FOAM Warning :
From function void setFieldType(const fvMesh& mesh, const labelList& selectedCells,Istream& fieldValueStream)
in file setFields.C at line 100
Field p not found


--> FOAM FATAL IO ERROR : wrong token type - expected word found on line 28 the label 0

file: /home/woody/iwst/iwsta019/OpenFOAM/iwsta019-1.4.1/run/Porous_Flow_Two_regions/sy stem/setFieldsDict::defaultFieldValues at line 28.

From function operator>>(Istream&, word&)
in file primitives/strings/word/wordIO.C at line 60.

FOAM exiting

I suspect that I have not difined or allocated the memory for the fields. What do you think about it?
arkasshka is offline   Reply With Quote

Old   December 6, 2007, 06:00
Default OK. Just for the records: are
  #10
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
OK. Just for the records: are you using 1.4 (as indicated by the blockMesh application-banner) or 1.4.1 (as indicated by the directory name). Not that it should make any difference.

Which version of funkySetField are you using? The latest (and the one that I vouch for) is the one on the svn (but I am not aware of any bug in previous versions that resembles what you're experiencing

Could you send me that the case and I'll have a look
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   December 6, 2007, 06:27
Default Hi Bernhard About OpenFOAM ve
  #11
New Member
 
Arkasshka
Join Date: Mar 2009
Location: Erlangen, Bayern, Germany
Posts: 16
Rep Power: 17
arkasshka is on a distinguished road
Hi Bernhard
About OpenFOAM version. At first, I used 1.4.1. I supposed that funky should have had to work with it. Then I decided to swith to 1.4 because it is mentioned that version funkySetFields.r7568 works with OpenFOAM 1.4. I have dounloaded the funky from here http://openfoamwiki.net/index.php/Co...funkySetFields I recompiled both funky and OpenFOAM. The compilation looks OK.
Here is a my case:
arkasshka is offline   Reply With Quote

Old   December 6, 2007, 06:29
Default Hi Bernhard About OpenFOAM ve
  #12
New Member
 
Arkasshka
Join Date: Mar 2009
Location: Erlangen, Bayern, Germany
Posts: 16
Rep Power: 17
arkasshka is on a distinguished road
Hi Bernhard
About OpenFOAM version. At first, I used 1.4.1. I supposed that funky should have had to work with it. Then I decided to swith to 1.4 because it is mentioned that version funkySetFields.r7568 works with OpenFOAM 1.4. I have dounloaded the funky from here http://openfoamwiki.net/index.php/Co...funkySetFields I recompiled both funky and OpenFOAM. The compilation looks OK.
Here is a my case:
arkasshka is offline   Reply With Quote

Old   December 6, 2007, 06:41
Default Hi Bernhard About OpenFOAM ve
  #13
New Member
 
Arkasshka
Join Date: Mar 2009
Location: Erlangen, Bayern, Germany
Posts: 16
Rep Power: 17
arkasshka is on a distinguished road
Hi Bernhard
About OpenFOAM version. At first, I used 1.4.1. I supposed that funky should have had to work with it. Then I decided to swith to 1.4 because it is mentioned that version funkySetFields.r7568 works with OpenFOAM 1.4. I have dounloaded the funky from here http://openfoamwiki.net/index.php/Co...funkySetFields I recompiled both funky and OpenFOAM. The compilation looks OK.
About the case, Can I send it to your email?
arkasshka is offline   Reply With Quote

Old   December 6, 2007, 09:56
Default Yep. Email is OK (in fact, tha
  #14
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Yep. Email is OK (in fact, that is what I intended with "send me". Otherwise I would have said "please post")
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   December 6, 2007, 14:48
Default Hi Arkasshka! The problem w
  #15
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Arkasshka!

The problem was that your case didn't have a dirctory 0 for the initial conditions. A "mkdir Porous_Flow_Two_regions/0" should fix this problem (note that you WILL need to set the -create option for any field that does not exist) for ANY version of FSF. The version on the svn is updated to be more tolerant in such situations

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   December 7, 2007, 03:11
Default Hi Bernhard Thank you very mu
  #16
New Member
 
Arkasshka
Join Date: Mar 2009
Location: Erlangen, Bayern, Germany
Posts: 16
Rep Power: 17
arkasshka is on a distinguished road
Hi Bernhard
Thank you very much for your advise.:-) It helped to fix the problem. Have a nice weekend :-).
Viel danken für Hilfe
P.S. I hope I have not make too many mistakes in the last phrase.)
arkasshka is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating multiple domains VSB CFX 4 February 21, 2007 17:20
Creating 2D geometry with ICEM TobiasZ CFX 4 April 13, 2006 05:32
creating a 2d plane from 3d geometry casey Main CFD Forum 0 April 18, 2005 15:11
Creating a Geometry in GAMBIT Sridhar FLUENT 2 November 26, 2001 11:11
Frustrated creating your own geometry? Brian Coon Main CFD Forum 0 November 23, 1999 07:36


All times are GMT -4. The time now is 20:29.