CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[ImmersedBoundary] Immersed Boundary Cylinder Tutorial using IcoIbFoam application

Register Blogs Community New Posts Updated Threads Search

Like Tree18Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 16, 2014, 00:32
Default Immersed Boundary Cylinder Tutorial using IcoIbFoam application
  #1
Member
 
Francis
Join Date: Jan 2014
Location: Toronto
Posts: 50
Rep Power: 12
afrotimy is on a distinguished road
Hi Everyone,

Good to find out that Immersed Boundary Mesh have been implemented in OpenFoam recently. However, I am trying to run the tutorial on Cavity and Flow around a cylinder with Immersed Boundary Foam in OF2.3.0 but gives so many error messages wheun running it with icoIbFoam command.
Even when I installed d version 1.6-ext, can't still run it.

I have followed the Tutorial procedures and included the additional dictionaries, but can't run.

Tried to run the wmake for compilation, but complains of not seeing octree.H and some other files. Meanwhile, octree.H and .C and in my meshtool directory.

Can anyone who has successfully ran this share more hints with me? I am a up comer.

Many thanks.
afrotimy is offline   Reply With Quote

Old   March 16, 2014, 10:10
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Francis,

It's really complicated to help you if you don't indicate which exact tutorial and source code you're referring to, where is it located and/or where you got it from.

edit: I ask this because I have absolutely no idea where such tutorial and solver exist

Best regards,
Bruno

Last edited by wyldckat; March 16, 2014 at 10:16. Reason: see "edit:"
wyldckat is offline   Reply With Quote

Old   March 17, 2014, 04:57
Default
  #3
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi

check this out:

http://www.cfd-online.com/Forums/ope...tml#post459040

AFAIK it is ready to compile and run, but only for 1.6-ext

Best,

Pablo
wyldckat likes this.
Phicau is offline   Reply With Quote

Old   April 2, 2014, 15:56
Default
  #4
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 18
kmooney is on a distinguished road
I may or may not have a functional 2.3 port of the IB code. I have run some interIbFoam tests which look pretty good but there seems to be some stabiltiy issues. Next step is port the ico solver and see how that performs. I'll try to keep you guys up to date if I make any progress.
kmooney is offline   Reply With Quote

Old   April 2, 2014, 16:49
Default
  #5
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 18
kmooney is on a distinguished road
Update: icoIbFoam seems to be working just fine!

Question for anyone reading this:
In order to port this I had to bring over the writeVTKNormals() function from foam extend and add it to the PrimitivePatch class in 2.3. Because of this I had to do a near full recompile of the whole OF install. Is there a more intelligent way to do this? Create a new derived class perhaps?

This was the only change I needed to make to the main foam installation. The rest of the changes were on the IB lib and IB solver side.
kmooney is offline   Reply With Quote

Old   April 5, 2014, 15:07
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

I had this on my to-do list for some weeks now and I've finally come around to git'ifying this source code and creating a wiki page for it:
Anyone and everyone, please feel free to edit the wiki page and fork the repository!


@Francis:
Quote:
Originally Posted by afrotimy View Post
Tried to run the wmake for compilation, but complains of not seeing octree.H and some other files. Meanwhile, octree.H and .C and in my meshtool directory.
You'll find installation instructions on the wiki page mentioned above, namely: http://openfoamwiki.net/index.php/Ex...y#Installation
Essentially, the missing step is to first run the script Allwclean:
Code:
./Allwclean
./Allwmake
----------------

@Kyle:
Quote:
Originally Posted by kmooney View Post
Update: icoIbFoam seems to be working just fine!
Nice!

Quote:
Originally Posted by kmooney View Post
Question for anyone reading this:
In order to port this I had to bring over the writeVTKNormals() function from foam extend and add it to the PrimitivePatch class in 2.3. Because of this I had to do a near full recompile of the whole OF install. Is there a more intelligent way to do this? Create a new derived class perhaps?
Let me see where this is used... mmm, firstly used from triSurface... which derives from PrimitivePatch... give me a few more minutes, to figure this out.


edit: Done! See this commit: https://github.com/wyldckat/Immersed...ea8f3c083f09c6
It's on the branch "decoupledTriSurface" in my git repository!

Best regards,
Bruno
be_inspired likes this.
__________________
wyldckat is offline   Reply With Quote

Old   April 10, 2014, 11:20
Default
  #7
Senior Member
 
M. Montero
Join Date: Mar 2009
Location: Madrid
Posts: 155
Rep Power: 17
be_inspired is on a distinguished road
Kyle, your port sounds quite interesting for me. Please, keep us informed.
Do you plan to port also simpleIBFoam?

Best Regards
be_inspired is offline   Reply With Quote

Old   April 11, 2014, 04:33
Default
  #8
Member
 
Francis
Join Date: Jan 2014
Location: Toronto
Posts: 50
Rep Power: 12
afrotimy is on a distinguished road
Hi Everyone, I have no idea on how to create my airfoil.ftr or immersedBoundary.ftr files. I already created my .stl files. Do anyone know how to create .ftr of the icoIbFoam?
Luttappy and mitu_94 like this.
afrotimy is offline   Reply With Quote

Old   April 11, 2014, 10:15
Default
  #9
Senior Member
 
M. Montero
Join Date: Mar 2009
Location: Madrid
Posts: 155
Rep Power: 17
be_inspired is on a distinguished road
Quote:
Originally Posted by afrotimy View Post
Hi Everyone, I have no idea on how to create my airfoil.ftr or immersedBoundary.ftr files. I already created my .stl files. Do anyone know how to create .ftr of the icoIbFoam?
Hi,

surfaceConvert file.stl file.ftr
Ftr files can not be opened with Paraview. Only STL geometries can be seen.

Best Regards
be_inspired is offline   Reply With Quote

Old   April 11, 2014, 10:31
Default
  #10
Member
 
Francis
Join Date: Jan 2014
Location: Toronto
Posts: 50
Rep Power: 12
afrotimy is on a distinguished road
Thank you. Do you mean I need to use tbw command: surfaceConvert file.stl file.ftr. ?
afrotimy is offline   Reply With Quote

Old   April 12, 2014, 14:44
Default
  #11
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 18
kmooney is on a distinguished road
Quote:
Originally Posted by be_inspired View Post
Kyle, your port sounds quite interesting for me. Please, keep us informed.
Do you plan to port also simpleIBFoam?

Best Regards
Yep, I plan on porting all of ZT's original solvers. If I have time over the weekend I'll fork off of wyldcat's git repo with the 2.3 port and his fix for the PrimitivePatch class.

I'll probably make a new thread once its up and running.

Cheers!
Kyle
wyldckat likes this.
kmooney is offline   Reply With Quote

Old   April 13, 2014, 19:36
Default
  #12
Member
 
Francis
Join Date: Jan 2014
Location: Toronto
Posts: 50
Rep Power: 12
afrotimy is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings to all!

I had this on my to-do list for some weeks now and I've finally come around to git'ifying this source code and creating a wiki page for it:
Anyone and everyone, please feel free to edit the wiki page and fork the repository!


@Francis:

You'll find installation instructions on the wiki page mentioned above, namely: http://openfoamwiki.net/index.php/Ex...y#Installation
Essentially, the missing step is to first run the script Allwclean:
Code:
./Allwclean
./Allwmake
----------------

@Kyle:

Nice!


Let me see where this is used... mmm, firstly used from triSurface... which derives from PrimitivePatch... give me a few more minutes, to figure this out.


edit: Done! See this commit: https://github.com/wyldckat/Immersed...ea8f3c083f09c6
It's on the branch "decoupledTriSurface" in my git repository!

Best regards,
Bruno
wyldckat,

Job well done.

I found out today that you prepared the git clone link and can now be installed on a network. I have really been worried about this.

Meanwhile, I am currently trying to simulate an airfoil with the IB method on OF16ext already installed on my Ubuntu. My ibAirfoil.ftr and ImmersedBoundary.ftr seems not to be in order. During running, I get 0 number of IB cells, no values for ImmersedBoundaryForces and ..

Code:
 Create time

Create mesh for time = 0

Reading transportProperties

Reading field p

Reading field U

Reading/calculating face flux field phi

Create immersed boundary cell mask
Create immersed boundary face mask
Found immersed boundary patch 0 named ibAirfoil
External flow
Number of IB cells: 0

Starting time loop

Time = 0.0016

Courant Number mean: 0.0156696 max: 0.393621 velocity magnitude: 6.28
--> FOAM Warning : 
    From function max(const UList<Type>&)
    in file /home/afrotimy/OpenFOAM/OpenFOAM-1.6-ext/src/OpenFOAM/lnInclude/FieldFunctions.C at line 322
    empty field, returning zero
Although, I used the NACA2STL.m script to generate my ibAirfoil.stl and ImmersedBoundary.stl files. I think something is wrong or it is not the right approach to creating them.

The keynote on how to compile a new solver is also a useful tool.

Please, can you further enlighten me on this.
Many thanks.
Luttappy likes this.

Last edited by wyldckat; April 20, 2014 at 15:07. Reason: Added [CODE][/CODE]
afrotimy is offline   Reply With Quote

Old   April 20, 2014, 15:12
Default
  #13
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Francis,

Quote:
Originally Posted by afrotimy View Post
Thank you. Do you mean I need to use tbw command: surfaceConvert file.stl file.ftr. ?
In case you or anyone else is still wondering, the idea is to run:
Code:
surfaceConvert path/to/file.stl path/to/file.ftr
Where "path/to/file" is the path to the file in question. For example, if we would want to convert the ".ftr" file available in the tutorial "flowOverCylinder/ibCylinder" to STL:
Code:
surfaceConvert constant/triSurface/cylinderRefined.ftr constant/triSurface/cylinderRefined.stl
As for your other question:
Quote:
Originally Posted by afrotimy View Post
Although, I used the NACA2STL.m script to generate my ibAirfoil.stl and ImmersedBoundary.stl files. I think something is wrong or it is not the right approach to creating them.
Open the STL files you've got in ParaView, to visually inspect them. And use the surfaceCheck to check if they're OK or not, e.g.:
Code:
surfaceCheck ibAirfoil.stl
Best regards,
Bruno
Luttappy likes this.
__________________
wyldckat is offline   Reply With Quote

Old   May 27, 2014, 18:37
Default
  #14
New Member
 
non
Join Date: Nov 2011
Posts: 3
Rep Power: 15
tewyme is on a distinguished road
Quote:
Originally Posted by afrotimy View Post
Hi Everyone,

Good to find out that Immersed Boundary Mesh have been implemented in OpenFoam recently. However, I am trying to run the tutorial on Cavity and Flow around a cylinder with Immersed Boundary Foam in OF2.3.0 but gives so many error messages wheun running it with icoIbFoam command.
Even when I installed d version 1.6-ext, can't still run it.

I have followed the Tutorial procedures and included the additional dictionaries, but can't run.

Tried to run the wmake for compilation, but complains of not seeing octree.H and some other files. Meanwhile, octree.H and .C and in my meshtool directory.

Can anyone who has successfully ran this share more hints with me? I am a up comer.

Many thanks.

Hi afrotimy,

Could you please tell me how did you solve this problem (more details will be appreciated)?. Thanks in advance.
tewyme is offline   Reply With Quote

Old   October 14, 2014, 12:52
Default
  #15
Senior Member
 
M. Montero
Join Date: Mar 2009
Location: Madrid
Posts: 155
Rep Power: 17
be_inspired is on a distinguished road
I have changed the original geometry by another one generated with CATIA and always I obtain the following message:
Can`t find nearest triSurface point for cell 3644, (x y z)

The stl is closed and surfaceCheck is ok.
What things are needed to take into account for stl generation?

UPDATED: The geometry is a cylinder with a box just above it. It seems like there are problems to detect the nearest triSurface point when the stl has two perpendicular ( or similar) surfaces. Any hint?
Depending on cell size, position wrt stl,... it could fail or not.
How to deal with it?
Attached Images
File Type: jpg picture1.jpg (45.4 KB, 165 views)
be_inspired is offline   Reply With Quote

Old   October 19, 2014, 06:52
Default
  #16
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

@be_inspired: From what I can see in the image you provided, it seems that you're demanding waaaaay too much from this (experimental?) IBM feature!
My advice is to simplify your STL so that there is only one change in geometry within each cell in the volume mesh.

For example, I believe that a golf ball might be successfully simulated using this solver, because the dimples on the balls surface aren't a very complex shape change. But still, the volume mesh resolution will likely have to be greater than the one on the example case.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   February 24, 2015, 15:23
Default
  #17
Member
 
Join Date: Jun 2011
Posts: 80
Rep Power: 15
maalan is on a distinguished road
Hi there!

I am trying to run this IB tutorial: 'ImmersedBoundary/tutorials/flowOverCylinder'. I am stuck because the next error appears once the mesh refinement has been done and I try to run 'icoIbFoam':

Code:
Create time

Create mesh for time = 0

Reading transportProperties

Reading field p

Reading field U

Reading/calculating face flux field phi

Create immersed boundary cell mask
Create immersed boundary face mask
Found immersed boundary patch 0 named ibCylinder
External flow
Number of IB cells: 1280

Starting time loop

Time = 0.01

Courant Number mean: 0.0474426 max: 0.480769 velocity magnitude: 1


--> FOAM FATAL ERROR: 
Can't find nearest triSurface point for cell 54841, (0.0104166 0.258333 0.003125)

    From function immersedBoundaryFvPatch::makeIbPointsAndNormals() const
    in file immersedBoundaryFvPatch/immersedBoundaryFvPatch.C at line 991.

FOAM aborting

Aborted (core dumped)
Nevertheless, when I don't refine the mesh the simulation runs correctly. I have tried to run some other tutorials without mesh refinement and there was no problem. It looks as if when the mesh is refined the order of the mesh faces does not agree with the surface ones.

I use the foam-extend-3.1 release.

Any hint??

Thanks in advance!!
Best,
ordinary and jennyjian like this.
maalan is offline   Reply With Quote

Old   August 1, 2015, 15:42
Default
  #18
Member
 
Manjura Maula Md. Nayamatullah
Join Date: May 2013
Location: San Antonio, Texas, USA
Posts: 42
Rep Power: 13
mmmn036 is on a distinguished road
Quote:
Originally Posted by maalan View Post
Hi there!

I am trying to run this IB tutorial: 'ImmersedBoundary/tutorials/flowOverCylinder'. I am stuck because the next error appears once the mesh refinement has been done and I try to run 'icoIbFoam':

Code:
Create time

Create mesh for time = 0

Reading transportProperties

Reading field p

Reading field U

Reading/calculating face flux field phi

Create immersed boundary cell mask
Create immersed boundary face mask
Found immersed boundary patch 0 named ibCylinder
External flow
Number of IB cells: 1280

Starting time loop

Time = 0.01

Courant Number mean: 0.0474426 max: 0.480769 velocity magnitude: 1


--> FOAM FATAL ERROR: 
Can't find nearest triSurface point for cell 54841, (0.0104166 0.258333 0.003125)

    From function immersedBoundaryFvPatch::makeIbPointsAndNormals() const
    in file immersedBoundaryFvPatch/immersedBoundaryFvPatch.C at line 991.

FOAM aborting

Aborted (core dumped)
Nevertheless, when I don't refine the mesh the simulation runs correctly. I have tried to run some other tutorials without mesh refinement and there was no problem. It looks as if when the mesh is refined the order of the mesh faces does not agree with the surface ones.

I use the foam-extend-3.1 release.

Any hint??

Thanks in advance!!
Best,
Did you able to solve your error? I am getting the same error for my roughness case using IBM on foam-extend-3.1.
mmmn036 is offline   Reply With Quote

Old   August 1, 2015, 18:03
Default
  #19
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 18
kmooney is on a distinguished road
You could try extending the trisurface search span vector in immersedBoundaryFvPatch.C around line 960:

Code:
    const vectorField& C = mesh_.C().internalField();

    const triSurfaceSearch& tss = ibPolyPatch_.triSurfSearch();

    forAll (ibc, cellI)
    {
        vector span
        (
            2*delta[cellI],
            2*delta[cellI],
            2*delta[cellI]
        );

        pointIndexHit pih = tss.nearest(C[ibc[cellI]], span);

        if (pih.hit())
        {
            ibPoints[cellI] = pih.hitPoint();
            ibNormals[cellI] =
                triSurfaceTools::surfaceNormal
                (
                    ibPolyPatch_.ibMesh(),
                    pih.index(),
                    pih.hitPoint()
                );
This is just a guess but I believe that is mag(span) is larger you'll extend your trisurface seach distance and perhaps hit your points. At the same time this could be the completely wrong way to address the problem and some other root cause could be acting here.

Cheers!
Kyle
kmooney is offline   Reply With Quote

Old   August 2, 2015, 16:13
Default
  #20
New Member
 
Join Date: Mar 2014
Posts: 17
Rep Power: 12
utkunun is on a distinguished road
Hi all,

I am having the same error but with a different cell ID (8921). Extending the span with 20*delta[cellI] did not work for me. I am using foam extend 3-1.

Any ideas on this?

Thanks.
utkunun is offline   Reply With Quote

Reply


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
Error - Solar absorber - Solar Thermal Radiation MichaelK CFX 12 September 1, 2016 06:15
Is Playstation 3 cluster suitable for CFD work hsieh OpenFOAM 9 August 16, 2015 15:53
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 07:20
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 08:00
New topic on same subject - Flow around race car Tudor Miron CFX 15 April 2, 2004 07:18


All times are GMT -4. The time now is 16:39.