CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   icoStructFoam on OF-1.6ext (https://www.cfd-online.com/Forums/openfoam-programming-development/142863-icostructfoam-1-6ext.html)

danny261083 October 10, 2014 19:26

icoStructFoam on OF-1.6ext
 
Hello All,

I was wondering whether anyone was able to successfully compile and run the test cases for the icoStructFoam solver in OpenFoam 1.6-ext. The solver has been known to compile and run seamlessly on OpenFoam 1.6.

Thanks in advance.

wyldckat October 11, 2014 16:19

Greetings danny261083,

Are you referring to this solver: http://openfoamwiki.net/index.php/Contrib_icoStructFoam ?

I was curious about it... and I've updated that wiki page, since it didn't have any information yet regarding the code that is available in the SVN repository at the FOAM-Extend project.

in theory, it's possible to recreate this solver from the source code of any OpenFOAM version, as long as the same steps for merging the two solvers icoFoam and stressedFoam or solidDisplacementFoam are used.

I started trying to quickly make a port of this solver icoStructFoam for 1.6-ext, but ended giving up, since I spent more than 20 minutes looking into this :(

I'll move this thread from the installation sub-forum to the programming sub-forum, since this requires a lot of programming questions and respective answers for making such a port possible.

Best regards,
Bruno

danny261083 October 14, 2014 17:39

Hi Bruno,

I was referring to the FSI solver posted on http://openfoamwiki.net/index.php/Contrib_icoStructFoam. I tried compiling the solver and running the test case on OF1.6 (extend version). However, I got an error stating icoStructFoam: command not found. I also tried to install OF1.6 using the instructions given on http://openfoamwiki.net/index.php/In...OAM-1.6/Ubuntu and was able to successfully build OpenFoam (in order to compile and run the icoStructFoam solver). Although I have used aliases to manage the 2 versions, I am now receiving an error stating blockMesh: command not found, when I attempted to run the cavity tutorial for OpenFoam-1.6 (the cavity tutorial in the extend version works without any issues). I would like to know whether there I might be making some mistakes during the solver building process for OF-1.6.

Thanks in advance.

wyldckat October 19, 2014 05:46

Hi danny261083,

In step #11 on this section: http://openfoamwiki.net/index.php/In...u#Ubuntu_12.04 - it references the file "make.log" and explains what to do with that file if you don't understand its contents.


This is really strange... according to the details on this thread: http://www.cfd-online.com/Forums/ope...oam-1-6-a.html - it's both stated that it's not possible to compile this solver in 1.6 and above, but it's later indicated that people managed to compile the solver in the more recent versions of OpenFOAM, but none of them provide their modified solver...

:eek: OK, this... is curious!? I've successfully compiled it on OpenFOAM 1.7.1 and 1.7.x, without any changes to the source code. Interesting, only the results on the "region1" have the mesh distorted... it did the same with an older OpenFOAM 1.5 (it's not 1.5.x nor 1.5-dev) and gave the same results, or at least it looked like it. Therefore, in OpenFOAM 1.6 or 1.6.x it should compile without any problems. But on 1.6-ext, this version apparently is different enough to complicate things...


Well, honestly, I don't know what to advise you. In 1.6-ext there is icoFsiFoam, which is meant to be better than icoStructFoam. And in foam-extend 3.1 there are a several more advanced solvers for this kind of simulation, within the category "solidMechanics".

Best regards,
Bruno

danny261083 November 24, 2014 01:11

2 Attachment(s)
Hi Bruno,

I was able to compile the icostructfoam solver on OpenFoam 2.3.0 by changing 'ddtPhiCorr' to 'ddtCorr'. However, I am getting some error messages while running the test cases (enclosed attachments). Additionally, I was attempting to compile the solver (http://openfoamwiki.net/index.php/Ex...re_interaction) in foam-extend-3.1. However, I was getting the error '/usr/bin/ld: cannot find -lfluidStructureInteraction'. I believe that the 'libfluidStructureInteraction.so' file is missing, hence the error. Any help on both these solvers would be greatly appreciated.

Thanks in advance.
Attachment 35427

Attachment 35428

wyldckat January 2, 2015 16:10

1 Attachment(s)
Hi danny261083,

I've finally managed to look into this. So here's what I can figure out:
  1. ChannelFSIError_icoStructFoam.txt - the error message is this one:
    Code:

    --> FOAM FATAL ERROR: 
    Attempt to cast type wall to type symmetryPlane
     
        From function refCast<To>(From&)
        in file /home/opencfd/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/typeInfo.H at line 114.
     
    FOAM aborting

    There is a "wall" somewhere that is defined as "symmetryPlane". My guess is that in the "constant/polyMesh/boundary" there is a boundary defined as "wall", but then in one of the field files that is defined as "symmetryPlane".
    I didn't find this example case, so I can't test it.
  2. LentosCaseError_icoStructFoam.txt - the error message is this one:
    Code:

    --> FOAM FATAL IO ERROR: 
    keyword displacementSBRStressCoeffs is undefined in dictionary "/home/administrator/OpenFOAM/administrator-2.3.0/run/thingOnStick/constant/region1/dynamicMeshDict"
     
    file: /home/administrator/OpenFOAM/administrator-2.3.0/run/thingOnStick/constant/region1/dynamicMeshDict from line 25 to line 43.
     
        From function dictionary::subDict(const word& keyword) const
        in file db/dictionary/dictionary.C at line 643.
     
    FOAM exiting

    You simply need to add the entry "displacementSBRStressCoeffs" to the file "constant/region1/dynamicMeshDict".
    I've looked at the respective test case and here's the bulk of the content that worked for me with OpenFOAM 2.3:
    Code:

    twoDMotion      yes;

    dynamicFvMesh dynamicMotionSolverFvMesh;

    motionSolverLibs ("libfvMotionSolvers.so");

    solver displacementSBRStress;

    displacementSBRStressCoeffs
    {
      diffusivity  uniform;
    }

    Problem is that now it gave me this error:
    Code:

    --> FOAM FATAL ERROR:
    dimensions of phi are not correct

        From function EulerDdtScheme<Type>::fvcDdtPhiCorr
        in file finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.C at line 676.

    FOAM aborting

    Which means that the modification you made is either incomplete or simply wrong.
  3. I've looked at how things changed in pisoFoam and it looks like the correctly adapted code for using in OpenFOAM 2.3 should be this:
    Code:

              phi = (fvc::interpolate(U) & mesh1.Sf())
                    + fvc::interpolate(rUA)*fvc::ddtCorr(U, phi);

  4. Now I get it, the case "thingOnStick" is actually meant to be post-processed as in the attached image! In other words, the base mesh of the solid part (region2) is kept so that the distortion calculations are more easily made! Hence the results is a displacement field, instead of having the mesh move.
    In ParaView, we can use the filter "Warp by Vector" to morph the mesh accordingly to the field "D". Pretty neat!
Since I finally managed to figure out how to use this solver and example cases, and since I took the time to port the code and cases, I've made these available here: https://github.com/wyldckat/IcoStructFoam and will update the wiki shortly.


Regarding the toolkit at http://openfoamwiki.net/index.php/Ex...re_interaction - I haven't looked at it yet. I'll make another post when I've had a look into it.


Best regards,
Bruno

wyldckat January 2, 2015 19:05

OK, continuing my investigation regarding your questions, the only one missing was this:
Quote:

Originally Posted by danny261083 (Post 520725)
Additionally, I was attempting to compile the solver (http://openfoamwiki.net/index.php/Ex...re_interaction) in foam-extend-3.1. However, I was getting the error '/usr/bin/ld: cannot find -lfluidStructureInteraction'. I believe that the 'libfluidStructureInteraction.so' file is missing, hence the error. Any help on both these solvers would be greatly appreciated.

:confused: I don't understand what is the problem here, because I tested building it just now with foam-extend 3.1 and I did not have a single problem with it.
I simply followed the instructions presented here: http://openfoamwiki.net/index.php/Ex...re_interaction - namely after unpacking and going into the folder "FluidStructureInteraction", I ran:
Quote:

Code:

cd src/
./Allwmake


I then ran Allwmake again and there was no error message.

Maimouna March 3, 2015 11:42

Greeting to all,

I'd like to start using FluidStructureInteraction package in extend-bazaar for foam-extend-3.1 version. How could I run HronTurekFsi3 case, for example?

I went to the case path: foam-extend-3.1/extend-bazaar/FluidStructureInteraction/fsiFoam/HronTurekFsi3

Then, applied ./makeSerialLinks fluid solid, but gives the following error
bash: ./makeSerialLinks: /bin/tcsh: bad interpreter: No such file or directory.

What's missing? Is that error related to such missing steps during installation?

Guide me please to the right direction.

Regards
Maimouna

wyldckat March 8, 2015 08:32

Hi Maimouna,

Run the following command, to fix those scripts:
Code:

sed -i -e 's=tcsh=bash=' *Links
Although those scripts serve no purpose anymore, since these tutorial cases already seem prepared to be used.

Best regards,
Bruno

Tomko May 30, 2017 18:28

Hi Bruno,

I am also trying to run the 3dtube in fsiFOAM.

I got the error like this. Could you please help me have a look and give me some suggestion? Thank you very much!

http://imgsrc.baidu.com/forum/pic/it...9b033bba76.jpg

wyldckat June 1, 2017 19:21

Quick answer: It looks like that the error message:
Code:

ln: creating symbolic link `folder_name': Protocol error
is due to the file system that doesn't support symbolic links. This can happen if the current folder is in a disk or partition that is formatted with an incompatible file system, for example if you are trying to run this in a partition that was created on Windows.

The simplest solution is to not run the case on that disk/partition.


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