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

[ImmersedBoundary] Immersed Boundary Method in OpenFOAM-3.1-ext

Register Blogs Community New Posts Updated Threads Search

Like Tree29Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 12, 2018, 12:44
Default load in more than 1 STL geometries for immersed boundary
  #81
New Member
 
MWu
Join Date: Nov 2013
Posts: 10
Rep Power: 12
gnoyeh525 is on a distinguished road
Quote:
Originally Posted by hjasak View Post
Hi Robert,

Thank you for looking into this. Can you please send me the files you have changed to review the bug fixes and merge them in.

I am looking into the best way to rewrite the parallel communications in the Immersed Boundary to make everything faster, but this is a bigger project so it will require real funding. The comms we have now are fine for a smaller number of processors, but as the decomposition increases, the code will become inefficient. I will speak to Zeljko to see what we should do; however, some significant funding is required to get this fixed.

Regarding the writing of U and other fields: at this point in the code, the data from the IB points is interpolated into the points of the STL surface. The algorithm I am using is a surface walk, which is linear if the STL is clean and does not protrude outside of the background mesh. Ideally, the resolution of the STL surface should be comparable with the resolution of the background mesh.

I assume you found a case where the surface walk algorithm fails, eg. if the STL is folded over or similarly broken.

Hrv

Dear Prof. Jasak

Is that possible to load in two or more STL geometries for immersed boundary ?
i.e. instead of 1 sphere, load in many spheres ... thanks as always
gnoyeh525 is offline   Reply With Quote

Old   March 12, 2018, 12:47
Default
  #82
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
Hi,

The STL can be in as many pieces as you like. I did not test the setup with multiple independent immersed boundaries in separate patches, so there may be problems related to coding; if you hit any we need some further development to deal with this.

You would only need to have true multiple IB patches (as opposed to having many bits of disconnected STL in a single immersed boundary) if you wish to post process eg forces on each bit separately.

Hope this helps,

Hrvoje
sourav90 likes this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   May 27, 2018, 16:29
Default
  #83
Member
 
Ben 017
Join Date: Nov 2017
Posts: 70
Rep Power: 8
Ben UWIHANGANYE is on a distinguished road
Hello
May you help to plot drag and lift coefficient in movingcylinderinchannel tutorial/immersedboundary/foam-extent 4.0?

I have changed the controlDict like this but it is printing out Cd=0, Cl=0 and Cm=0 for all time steps. what could be the reason behind?.


functions
{
forces
{

type forceCoeffs;
functionObjectLibs ( "libforces.so" );
outputControl timeStep;
outputInterval 1;
patches
(
wall
);
pName p;
UName U;
rhoName rhoInf;
log true;
rhoInf 1;
CofR ( 0 0 0 );
liftDir (0 1 0);
dragDir ( 1 0 0 );
pitchAxis ( 0 0 0 );
magUInf 1;
lRef 1;
Aref 1;
}
}
Ben UWIHANGANYE is offline   Reply With Quote

Old   September 16, 2018, 19:06
Default
  #84
New Member
 
KAMBIZ
Join Date: Jul 2017
Posts: 1
Rep Power: 0
Nikrouz is on a distinguished road
Hello everybody ....


I'm new to Foam extend .... as mentioned in release note of foam-extend 4.0, there have been significant improvements in Immersed Boundary Solvers. Is it possible to consider the immersed body as an "elastic structure"? If yes, which tutorials is suitable to start simulation?


Thanks everybody.
andrewbickerdike likes this.
Nikrouz is offline   Reply With Quote

Old   October 18, 2018, 08:56
Default
  #85
zjz
New Member
 
ZhaoJia
Join Date: Nov 2017
Posts: 8
Rep Power: 8
zjz is on a distinguished road
Quote:
Originally Posted by hjasak View Post
For the record: we will release the latest version of immersed boundary in foam-extend-3.2

Hrv
Dear Professor Jasak:
I have run the example of movingCylinderInChannelIco without change it in foam extend 4.0, but when i open it with paraview and run it, there is a fatal error "size of field refValue(96) is not the same size as the patch(0) on patch ibCylinder of field U in file"movingCylinerInChannelIco/0.2/U", what is the reason for this?

Thanks for your reply!
zjz is offline   Reply With Quote

Old   May 16, 2019, 11:29
Default
  #86
New Member
 
Join Date: Oct 2018
Posts: 9
Rep Power: 7
mosaferkarbala is on a distinguished road
Send a message via Skype™ to mosaferkarbala
Quote:
Originally Posted by Phil_ View Post
Dear all,

so foam-extend next release (release 3.2) is available and I ran a small test for the immersed boundary.

For the kEpsilon turbulence model it works like a charm, but with the kOmegaSST model it complains about "tauWall not set for IB patch ibChannel for field U". In the kEpsilon model tauWall is set by the immersedBoundaryEpsilonWallFunction. This wall function is replaced by immersedBoundaryOmegaWallFunction where tauWall is not defined.

Any ideas?

In the meantime I'll dig in a little more and try to find out what's going on.

Phil
hey
do u find where this error comes from! im stuck on same error, any help would be appreciated
--> FOAM FATAL ERROR:
[0] tauWall not set for IB patch hull for field U
[0]
[0] From function const vectorField& immersedBoundaryVelocityWallFunctionFvPatchVectorF ield::wallShearStress() const
[0] in file wallFunctions/immersedBoundaryVelocityWallFunctions/immersedBoundaryVelocityWallFunctionFvPatchVectorF ield.C at line 200.

thanks
mosaferkarbala is offline   Reply With Quote

Old   August 30, 2019, 07:40
Default
  #87
New Member
 
rubingqin
Join Date: Apr 2019
Posts: 6
Rep Power: 7
Ginjames is on a distinguished road
Quote:
Originally Posted by Ben UWIHANGANYE View Post
Hello
May you help to plot drag and lift coefficient in movingcylinderinchannel tutorial/immersedboundary/foam-extent 4.0?

I have changed the controlDict like this but it is printing out Cd=0, Cl=0 and Cm=0 for all time steps. what could be the reason behind?.


functions
{
forces
{

type forceCoeffs;
functionObjectLibs ( "libforces.so" );
outputControl timeStep;
outputInterval 1;
patches
(
wall
);
pName p;
UName U;
rhoName rhoInf;
log true;
rhoInf 1;
CofR ( 0 0 0 );
liftDir (0 1 0);
dragDir ( 1 0 0 );
pitchAxis ( 0 0 0 );
magUInf 1;
lRef 1;
Aref 1;
}
}
Have you solved this problem?I have a same one. please help me,thank you very much
Ginjames is offline   Reply With Quote

Old   August 30, 2019, 10:12
Default Immersedbounday
  #88
New Member
 
Join Date: Oct 2018
Posts: 9
Rep Power: 7
mosaferkarbala is on a distinguished road
Send a message via Skype™ to mosaferkarbala
As u know there is no physical body in mesh because its immersed. So the wall type should be immersed boundary wall
Look at immersedboundary tutorials u will find it
mosaferkarbala is offline   Reply With Quote

Old   September 1, 2019, 03:53
Default
  #89
New Member
 
rubingqin
Join Date: Apr 2019
Posts: 6
Rep Power: 7
Ginjames is on a distinguished road
I am so appreciated for your reply. But there is no tutorials in IBM of forcecoeffs. I'm still confused about the zero. Below is my controldict about force and forcecoeffs. The patch name is my immersed boundary. So what should I do?Looking forward to your help!
best wishes!

functions
(
forces
{
type immersedBoundaryForces;
functionObjectLibs ("libimmersedBoundaryForceFunctionObject.so");


outputControl timeStep;
outputInterval 1;
patches ( ibCylinder );

pName p;
UName U;
rhoName rhoInf;
rhoInf 1;

log true;
CofR ( 0 0 0 );

Aref 0.05;
Uref 1;
}

forces
{
type forceCoeffs;
functionObjectLibs ( "libforces.so" );
//functionObjectLibs ("libimmersedBoundaryForceFunctionObject.so");
outputControl timeStep;
outputInterval 1;
patches ( ibCylinder );
pName p;
UName U;
log true;
rhoName rhoInf;
rhoInf 1;
CofR ( 0 0 0 );
liftDir ( 0 1 0 );
dragDir ( 0 0 1 );
pitchAxis ( 0 0 0 );
magUInf 1;
lRef 2.83;
Aref 0.05;
}
Ginjames is offline   Reply With Quote

Old   September 1, 2019, 13:06
Default Immersed boundary forces
  #90
New Member
 
Join Date: Oct 2018
Posts: 9
Rep Power: 7
mosaferkarbala is on a distinguished road
Send a message via Skype™ to mosaferkarbala
The first one in enough in foam extend immesrd bounday . Force coeff not needed.
After run afolder will create by name forces and u will find force and moments components inside it
Best regards
mosaferkarbala is offline   Reply With Quote

Old   September 1, 2019, 20:50
Default
  #91
New Member
 
rubingqin
Join Date: Apr 2019
Posts: 6
Rep Power: 7
Ginjames is on a distinguished road
So the last question is that I want to get the force coefficient, such as drag of friction coefficient,to do some verification. What should I do?How to calculate? Is the force in the forcefille in N/m3 or whatelse? Best gratitudes for you. I have stumbled for a long time. thank you again.
Ginjames is offline   Reply With Quote

Old   September 2, 2019, 00:00
Default
  #92
New Member
 
Join Date: Oct 2018
Posts: 9
Rep Power: 7
mosaferkarbala is on a distinguished road
Send a message via Skype™ to mosaferkarbala
Quote:
Originally Posted by Ginjames View Post
So the last question is that I want to get the force coefficient, such as drag of friction coefficient,to do some verification. What should I do?How to calculate? Is the force in the forcefille in N/m3 or whatelse? Best gratitudes for you. I have stumbled for a long time. thank you again.
Hi dear brother
I also faced with that problem since the force coeffs always get zero since dosent sense the immersed body. The way i used computing drag using forces directly using drag coeff formula which is the force component in the motion direction and the surface
Best regards
mosaferkarbala is offline   Reply With Quote

Old   September 2, 2019, 21:20
Default
  #93
New Member
 
rubingqin
Join Date: Apr 2019
Posts: 6
Rep Power: 7
Ginjames is on a distinguished road
So what is the dimension in the force fields? I tried to calculate drag force coeffs,but can't agree with the literature. I think my formula is wrong. It’s a shame that I don't figure out the force file,is it in N/m3 or N/m or something else? How you calculate it?
Ginjames is offline   Reply With Quote

Old   September 2, 2019, 21:53
Default
  #94
New Member
 
Join Date: Oct 2018
Posts: 9
Rep Power: 7
mosaferkarbala is on a distinguished road
Send a message via Skype™ to mosaferkarbala
Quote:
Originally Posted by Ginjames View Post
So the last question is that I want to get the force coefficient, such as drag of friction coefficient,to do some verification. What should I do?How to calculate? Is the force in the forcefille in N/m3 or whatelse? Best gratitudes for you. I have stumbled for a long time. thank you again.
Quote:
Originally Posted by Ginjames View Post
So what is the dimension in the force fields? I tried to calculate drag force coeffs,but can't agree with the literature. I think my formula is wrong. It’s a shame that I don't figure out the force file,is it in N/m3 or N/m or something else? How you calculate it?
Dimentions as i know is 3 major dimentions xyz, forces are in N and for drag
Fd =Cd*Ar*rhoV^2(1/2)
Fd is force in flow direction which in my case was -x direction, rho is ur fluid property and Ar is reference area which is 1D image of 3d shape that its surface vector is in flow direction
Thats it
For me this work quite fine
Best regards
mosaferkarbala is offline   Reply With Quote

Old   September 3, 2019, 20:17
Default
  #95
New Member
 
rubingqin
Join Date: Apr 2019
Posts: 6
Rep Power: 7
Ginjames is on a distinguished road
Thank you brother. It’s very useful.
Ginjames is offline   Reply With Quote

Old   December 6, 2019, 16:51
Default Immersed Boundary Method in foam extend 4.0
  #96
New Member
 
Cindy Chen
Join Date: Sep 2019
Posts: 1
Rep Power: 0
cychen0318 is on a distinguished road
Hi,

I know this is an old post, but I am trying to implement the immerse boundary method in foam extend 4.0.

I have some problems with parallel running, although the error message is different from what you got before.
I use the same way to edit $WM_PROJECT_DIR/etc/controlDict and change commsType to nonBlocking as:


Quote:
Originally Posted by Phicau View Post
Hi Hua,


this error rings a bell to me:

Code:
[pjh-Veriton-D832:8321] *** An error occurred in MPI_Recv
[pjh-Veriton-D832:8321] *** on communicator MPI_COMM_WORLD
[pjh-Veriton-D832:8321] *** MPI_ERR_TRUNCATE: message truncated
[pjh-Veriton-D832:8321] *** MPI_ERRORS_ARE_FATAL: your MPI job will now abort
It was also triggered by a parallel boundary condition I developed. The solution was found thanks to Bernhard:

Edit $WM_PROJECT_DIR/etc/controlDict and change commsType to nonBlocking .

You should try and see if this helps with your problem.

Best,

Pablo

However, it seems that the problem is not solved and same error message pops up after I did the commsType change.


I have attached the log files from decomposePar and parallel run in the following:


This is the log for decomposePar:

Quote:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Time = 0
Create mesh for region region0

Calculating distribution of cells
Selecting decompositionMethod simple

Finished decomposition in 0.61 s

Calculating original mesh data

Distributing cells to processors

Distributing faces to processors

Calculating processor boundary addressing

Distributing points to processors

Constructing processor meshes

Processor 0
Number of cells = 136711
Number of faces shared with processor 1 = 702
Number of faces shared with processor 2 = 11002
Number of processor patches = 2
Number of processor faces = 11704
Number of boundary faces = 1280

Processor 1
Number of cells = 136853
Number of faces shared with processor 0 = 702
Number of faces shared with processor 3 = 10961
Number of faces shared with processor 2 = 1
Number of processor patches = 3
Number of processor faces = 11664
Number of boundary faces = 1564

Processor 2
Number of cells = 136853
Number of faces shared with processor 0 = 11002
Number of faces shared with processor 3 = 681
Number of faces shared with processor 1 = 1
Number of processor patches = 3
Number of processor faces = 11684
Number of boundary faces = 1280

Processor 3
Number of cells = 136711
Number of faces shared with processor 1 = 10961
Number of faces shared with processor 2 = 681
Number of processor patches = 2
Number of processor faces = 11642
Number of boundary faces = 1564

Number of processor faces = 23347
Max number of processor patches = 3
Max number of faces between processors = 11704

Processor 0: field transfer
External flow
Number of IB cells: 100
triangles: 73264 hit: 100
Processor 1: field transfer
External flow
Number of IB cells: 0
triangles: 73264 hit: 0
Processor 2: field transfer
External flow
Number of IB cells: 100
triangles: 73264 hit: 100
Processor 3: field transfer
External flow
Number of IB cells: 0
and this is the log for parallel run:
Quote:
Pstream initialized with:
nProcsSimpleSum : 0
commsType : nonBlocking
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


PIMPLE: Operating solver in PISO mode

Create immersed boundary cell mask
Create immersed boundary face mask
Found immersed boundary patch 0 named ibSphere
External flow
[1] Number of IB cells: 0
[3] Number of IB cells: 0
[0] Number of IB cells: 100
[2] Number of IB cells: 100
Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type RASModel
Selecting RAS turbulence model kEpsilon
kEpsilonCoeffs
{
Cmu 0.09;
C1 1.44;
C2 1.92;
sigmaEps 1.3;
}


Starting time loop

Creating minMaxField for field p
Creating minMaxField for field U
Creating maxFieldCell for field epsilon
Time = 0.004

Courant Number mean: 0 max: 0.016 velocity magnitude: 0.25
PIMPLE: iteration 1
BiCGStab: Solving for Ux, Initial residual = 1, Final residual = 1.8743e-12, No Iterations 1
BiCGStab: Solving for Uy, Initial residual = 1, Final residual = 1.00661e-14, No Iterations 1
BiCGStab: Solving for Uz, Initial residual = 1, Final residual = 4.16333e-10, No Iterations 1
DICPCG: Solving for p, Initial residual = 1, Final residual = 0.0494606, No Iterations 132
IB time step continuity errors : sum local = 4.94896e-07, global = -8.45457e-09, cumulative = -8.45457e-09
DICPCG: Solving for p, Initial residual = 0.0150682, Final residual = 9.2989e-07, No Iterations 155
IB time step continuity errors : sum local = 1.04925e-09, global = 5.80027e-12, cumulative = -8.44877e-09
BiCGStab: Solving for epsilon, Initial residual = 0.0474431, Final residual = 1.09794e-11, No Iterations 1
BiCGStab: Solving for k, Initial residual = 0.309904, Final residual = 8.62141e-11, No Iterations 1
ExecutionTime = 11.25 s ClockTime = 11 s

triangles: 73264 hit: 100
[1]
[1]
[1] --> FOAM FATAL ERROR:
[1] tauWall not set for IB patch ibSphere for field U
[1]
[1] From function const vectorField& immersedBoundaryVelocityWallFunctionFvPatchVectorF ield::wallShearStress() const
[1] in file wallFunctions/immersedBoundaryVelocityWallFunctions/immersedBoundaryVelocityWallFunctionFvPatchVectorF ield.C at line 200.
[1]
FOAM parallel run aborting
[1]
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 1 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
Please let me know if you have encountered this issue or any idea how to solve this problem.
Thanks,


Cindy
cychen0318 is offline   Reply With Quote

Old   May 18, 2020, 06:31
Default
  #97
New Member
 
Shang-Gui Cai
Join Date: Jan 2012
Location: Marseille, France
Posts: 10
Rep Power: 14
cookcaptain is on a distinguished road
Hi,


Is it possible to output the skin friction on the immersed surfaces ?


Thanks
cookcaptain is offline   Reply With Quote

Old   May 18, 2020, 06:45
Default
  #98
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
Sure - use the wallShearStress tool. Immersed boundary is just a normal patch, although handled in a different ways.


Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   May 21, 2020, 06:01
Default
  #99
New Member
 
Shang-Gui Cai
Join Date: Jan 2012
Location: Marseille, France
Posts: 10
Rep Power: 14
cookcaptain is on a distinguished road
Thanks a lot. The skin friction is extracted to the VTK file in each time step folder. But the VTK wall pressure has all zero values in the pitzDailyTurbulent case within foam-extend-4.1. It may be a bug for this particular case with the simpleFoam solver ?



Nevertheless the wall pressure can still be accessed from the usual volume solution by filtering the IB flag. The wall shear stress however does not work properly in the same way compared to the VTK data.



Moreover, the wall surface quantities are extracted on the near wall cell boundaries in foam-extend-4.1, instead of the STL surface in foam-extend-4.0. Is it for accuracy consideration ?




Shanggui





Quote:
Originally Posted by hjasak View Post
Sure - use the wallShearStress tool. Immersed boundary is just a normal patch, although handled in a different ways.


Hrv
cookcaptain is offline   Reply With Quote

Old   May 22, 2020, 09:08
Default
  #100
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
Not zero for me - are you sure you are looking at the right thing?

I run the tutorial to 150 iterations (not fully converged) and then wallShearStress. Attached is a picture: top is wall shear stress and bottom is pressure.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk

Last edited by hjasak; May 22, 2020 at 09:08. Reason: Add picture
hjasak is offline   Reply With Quote

Reply

Tags
immersed boundary method, openfoam-1.6-ext, openfoam-3.1-ext


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
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 07:38
Radiation in semi-transparent media with surface-to-surface model? mpeppels CFX 11 August 22, 2019 07:30
implementation of the Immersed Boundary Method mi_cfd Main CFD Forum 19 April 24, 2019 01:24
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 06:20
[ImmersedBoundary] who has the paper about immersed boundary method in openfoam blueshit OpenFOAM Community Contributions 1 November 18, 2013 07:16


All times are GMT -4. The time now is 19:52.