CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [ImmersedBoundary] Immersed Boundary Cylinder Tutorial using IcoIbFoam application (https://www.cfd-online.com/Forums/openfoam-community-contributions/131488-immersed-boundary-cylinder-tutorial-using-icoibfoam-application.html)

olivierG August 4, 2015 04:53

hello,

I am looking to use immersed boundary with extend 3.1 - 3.2 for vacuum roots pump, but i do not see anything to move (rotate) the immersed boundary, neither to refine: pimpleIbFoam is not here.

At OFW10, Kyle has shown such simulation with parallel load balancing, refine, moving IB surface, ... all i need.

How can i get my hand on it ?
If needed, support contract for this is a possibility.

regards,
olivier

cfdwave October 9, 2015 02:54

immersed boundary with sixDoFsolver
 
Hi All,
I just downloaded foam-extend 3.2 and was wondering if it is possible to model the floating box (sixDoFsolver) with immersed boundary.

I would appreciate of anyone give me some hint on how to mix immersed boundary with sixDoFsolver.

Thanks a lot guys

wyldckat October 10, 2015 05:56

Quick answer: See posts #8 and #11 on this thread: http://www.cfd-online.com/Forums/ope...tml#post567229

cfdwave October 11, 2015 23:17

Hi Bruno,
Thank you very much for your reply. I did as you instructed however, it fails with floating point exception.

Code:

Create time

Create dynamic mesh for time = 0

Selecting dynamicFvMesh immersedBoundarySolidBodyMotionFvMesh
Selecting solid-body motion function linearOscillation
Reading transportProperties

Reading field p

Reading field U

Reading/calculating face flux field phi


Starting time loop

Time = 0.01

solidBodyMotionFunctions::linearOscillation::transformation(): Time = 0.01 transformation: ((0.012565 0 0) (1 (0 0 0)))
Moving immersed boundary points for patch ibCylinder
Mesh update1
Create immersed boundary cell mask
Create immersed boundary face mask
Found immersed boundary patch 0 named ibCylinder
External flow
Number of IB cells: 36
Courant Number mean: 0.126712 max: 0.5 velocity magnitude: 1
BiCGStab:  Solving for Ux, Initial residual = 0.0890341, Final residual = 1.47439e-09, No Iterations 2
Floating point exception (core dumped)

I also get the following warnings with blockMesh command

Code:

--> FOAM Warning :
    From function dlLibraryTable::open(const fileName& functionLibName)
    in file db/dlLibraryTable/dlLibraryTable.C at line 91
    could not load /media/Data/foam/foam-extend-3.2/lib/linux64GccDPOpt/libimmersedBoundaryDynamicFvMesh.so: undefined symbol: _ZTIN4Foam13dynamicFvMeshE


I would highly appreciate your comments.

Cheers
Ash

wyldckat October 12, 2015 16:02

Quick questions and suggestion @Ash:
  1. In which Operating System, version and architecture did you install foam-extend?
  2. How did you build the source code?
  3. You might want to check the latest post on this topic: http://www.cfd-online.com/Forums/ope...tml#post567546 post #12

cfdwave October 13, 2015 02:04

Hi Bruno,

here are the details of my OS:

Code:

hpc162@hpc162:~$ lsb_release -a
No LSB modules are available.
Distributor ID:        Ubuntu
Description:        Ubuntu 12.04.5 LTS
Release:        12.04
Codename:        precise

Code:

hpc162@hpc162:~$ uname -m
x86_64

I built the foam extend 3.2 exactly based on your instruction given at post #12 for a clean installation

Code:

git clone git://git.code.sf.net/p/foam-extend/foam-extend-3.2 foam-extend-3.2
cd foam-extend-3.2
git checkout nextRelease

and then
Quote:

Allwmake.firstInstall
For pre-requisits I installed

Code:

sudo apt-get install git-core build-essential binutils-dev flex \
bison zlib1g-dev qt4-dev-tools libqt4-dev libncurses5-dev \
libxt-dev rpm mercurial graphviz

I even removed it and installed again and got exactly the same error. For test I ran ./Allrun in "
Quote:

cylinderInChannelIcoIbFoam
" tutorial and got this error in
Quote:

log.icoIbFoam
.


Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | foam-extend: Open Source CFD                    |
|  \\    /  O peration    | Version:    3.2                                |
|  \\  /    A nd          | Web:        http://www.foam-extend.org        |
|    \\/    M anipulation  | For copyright notice see file Copyright        |
\*---------------------------------------------------------------------------*/
Build    : 3.2-e596b6462cf7
Exec    : icoIbFoam
Date    : Oct 13 2015
Time    : 14:01:40
Host    : hpc162
PID      : 25045
CtrlDict : "/media/DATA_1TB/foam_ext_Simulations/ImmersedBoundary/cylinderInChannelIcoIbFoam/system/controlDict"
Case    : /media/DATA_1TB/foam_ext_Simulations/ImmersedBoundary/cylinderInChannelIcoIbFoam
nProcs  : 1
SigFpe  : Enabling floating point exception trapping (FOAM_SIGFPE).

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

Create mesh for time = 0

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

Reading field p

Reading field U

Floating point exception (core dumped)

I would highly appreciate your comment.

cfdwave October 13, 2015 02:26

Hi again Bruno,

I tried to run few simulations to test my installation (icoFoam, interDyMFoam and icoDyMFoam). In case of icoDyMFoam I ran movingConeMotion and got the same floating point exception error.

Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | foam-extend: Open Source CFD                    |
|  \\    /  O peration    | Version:    3.2                                |
|  \\  /    A nd          | Web:        http://www.foam-extend.org        |
|    \\/    M anipulation  | For copyright notice see file Copyright        |
\*---------------------------------------------------------------------------*/
Build    : 3.2-e596b6462cf7
Exec    : icoDyMFoam
Date    : Oct 13 2015
Time    : 14:17:51
Host    : hpc162
PID      : 25446
CtrlDict : "/media/DATA_1TB/foam_ext_Simulations/movingConeMotion/system/controlDict"
Case    : /media/DATA_1TB/foam_ext_Simulations/movingConeMotion
nProcs  : 1
SigFpe  : Enabling floating point exception trapping (FOAM_SIGFPE).

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

Create dynamic mesh for time = 0

Selecting dynamicFvMesh dynamicMotionSolverFvMesh
Floating point exception (core dumped)

All other cases were fine.

wyldckat October 17, 2015 15:12

Hi cfdwave,

OK, there are a few possibilities for the problem you're seeing:
  1. You're using Ubuntu 12.04, which is known to have some issues with foam-extend 3.2 when built with GCC 4.6.3 that Ubuntu 12.04 has got. The only problem I had so far was that it would take a long time to build solvers and utilities, but it's possible that there are other problems as well. In order to avoid this, you can follow the instructions I mentioned in a recent post of mine:
    Quote:

    Originally Posted by wyldckat (Post 568772)
    Quick answer: Wiki page with installation instructions for foam-extend 3.2 is now up: https://openfoamwiki.net/index.php/I...oam-extend-3.2

    For installing on Ubuntu 12.04, make sure to follow the instructions given here: https://openfoamwiki.net/index.php/I...u#Ubuntu_12.04

  2. The other possibility is that the case folders are in a mounted partition "/media/something". It's possible that for some reason the file system used by the mount is incompatible or too slow or something like that, resulting in the crash of the solver.
  3. Worst case scenario, there is a hardware problem with your system's RAM, motherboard and/or CPU. Hopefully this is not the case.
Best regards,
Bruno

cfdwave October 18, 2015 03:57

Quote:

Originally Posted by wyldckat (Post 568782)
Hi cfdwave,

OK, there are a few possibilities for the problem you're seeing:
  1. You're using Ubuntu 12.04, which is known to have some issues with foam-extend 3.2 when built with GCC 4.6.3 that Ubuntu 12.04 has got. The only problem I had so far was that it would take a long time to build solvers and utilities, but it's possible that there are other problems as well. In order to avoid this, you can follow the instructions I mentioned in a recent post of mine:
  2. The other possibility is that the case folders are in a mounted partition "/media/something". It's possible that for some reason the file system used by the mount is incompatible or too slow or something like that, resulting in the crash of the solver.
  3. Worst case scenario, there is a hardware problem with your system's RAM, motherboard and/or CPU. Hopefully this is not the case.
Best regards,
Bruno

Hi Bruno,

Thanks for your comments. I followed your instructions step-by-step yet again it failed with the same error. I don't think there is any issue on my mounted drive (I have few versions of openfoam installed on the same drive and all working just fine) or my hardware.

I have been very hesitant to upgrade my Ubuntu (I learned a lesson in hard way that when my system is working don't upgrade it ;) ) but will try to see if I can try it on another machine with Ubuntu 14.

Thanks again
Ashkan

wyldckat October 18, 2015 06:38

Hi Ashkan,

The other possibility that I forgot to mention is that perhaps you have something in the shell environment that is contaminating the memory space used by the solver. Either a previous foam-extend or OpenFOAM version might be partially loaded in the environment you are working in, when you activate the one for foam-extend 3.2. Make sure you start in a clean terminal... you can find some more details here: http://openfoamwiki.net/index.php/In...with_the_Shell

The other possibility is if you have something that is using the library preload feature that exists on Linux, where an environment variable can force one or more libraries to be always loaded onto RAM with each application that is launched from the command line.


And indeed, don't upgrade your operating system unless you are 110 to 200% prepared to do so. One small mistake and you're set back several days/weeks of work.

Best regards,
Bruno

afrotimy January 21, 2016 00:15

immersedBoundaryFvPatchField in OpenFoam
 
2 Attachment(s)
Hi Foamers,

I have going through the ImmersedBoundary patches and patchFields in openfoam and could not fully understand the implementation.

Actually, I need to understand the theory behind the IB boundary condition code in OF so that I can take into account the flexibility of the IB.

Although, I have a lot of journals on IBM but it is not clear to me how the forcing term in the N-S equation has been implemented in OpenFoam BC on the fields.

Do anyone have any literature that is specific to this code ? Please share a link. I will be so grateful.


See attached codes files.

kmooney January 21, 2016 14:25

Quote:

Originally Posted by afrotimy (Post 581838)
Hi Foamers,

I have going through the ImmersedBoundary patches and patchFields in openfoam and could not fully understand the implementation.

Actually, I need to understand the theory behind the IB boundary condition code in OF so that I can take into account the flexibility of the IB.

Although, I have a lot of journals on IBM but it is not clear to me how the forcing term in the N-S equation has been implemented in OpenFoam BC on the fields.

Do anyone have any literature that is specific to this code ? Please share a link. I will be so grateful.


See attached codes files.

This is the original presentation by Zeljko at the Darmstadt conference, should be a good place to start:

http://openfoam-extend.sourceforge.n...7_Program.html

Cheers!
K

DoQuocVu May 29, 2017 06:42

Quote:

Originally Posted by kmooney (Post 558014)
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

Hi Kyle,

I'm getting the same error after trying to make some adjustment in the cylinderInChannelIcoIbFoam tutorials in foam-extend 3.2. All i've done is to change the boundary condition of inlet and outlet to cyclic. Do you think that the boundary condition can influence the process of finding the immersed boundary?

jennyjian July 16, 2021 03:45

I worked on the mesh refinement as well, at the same time I refined the stl triangle meshes, however, the same error occured. I checked and find there is one coefficient , radiusFactor_ that can be changed in the souce code of immersedBoundaryFvPatch, sometimes it worked, but when I increased it greatly, the matrix will be singular, I am stuck. Actually I made it output the coordinates of the ibcells, and found the cells didn't assemble well with the boundary. I am working on the backstep turbulence flow.


All times are GMT -4. The time now is 06:13.