CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions > OpenFOAM CC Toolkits for Fluid-Structure Interaction

From fsiFoam to solids4Foam

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 1 Post By bigphil
  • 2 Post By bigphil
  • 2 Post By bigphil

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 26, 2019, 05:59
Default From fsiFoam to solids4Foam
  #1
New Member
 
Join Date: Mar 2017
Posts: 15
Rep Power: 9
paulbr is on a distinguished road
Dear all,
I've recently started to use solids4Foam, thanks to Dr. Cardiff, which is, in my opinion, much easier than FsiFoam to use and understand. For now I just used it and I haven't start to develop so my questions could be irrelevant but might help others...

I'm working on oscillating immersed structures and I have some questions related to solids4Foam. The first 2 are linked with the illustrations:
beam_BC.jpg
domaines_beam_BC.png
1) In fsiFoam, I'm using a variation of timeVaryingFixedRotation to rotate a face of my immersed structure (in green in the attached file). Is there already an equivalent function in solids4foam to force the displacement/rotation of a face ?
2) As the rotation of the immersed structure face is known (and only this one), the corresponding fluid mesh movement is also known and forced. Is there a way to force the fluid mesh displacement/rotation on a specific patch, while the rest is governed by a dynamic mesh solver such as velocityLaplacian ?

The following questions are more for my understanding/curiosity:
3) My fluid mesh are way bigger than the solid one. I'm working with turbulent flow in large fluid domain. So, can I decompose the fluid with a different number of processor than the solid ? It seems that I can't.
4) If I can't, why ? I known that "The entire FSI interface is stored on each processor (globalPolyPatch) to allow straight-forward parallelisation." from Dr Cardiff. Isn't this method less efficient when one of the mesh is much bigger than the other ?

5) Finally, for now (with fsiFoam), Aitken method has always been more efficient and stable than IQNILS algorithm, though it shouldn't be according to several articles. Do you have any idea why ?

Hope I made myself clear.
Regards,

Paul
paulbr is offline   Reply With Quote

Old   November 26, 2019, 06:59
Default
  #2
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,093
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Hi Paul,

(1) You can use "fixedRotation": it can be specified as follows:
Code:
    yourPatchName
    {
        type            fixedRotation;
        rotationAngleSeries
        {
            fileName        "$FOAM_CASE/constant/timeVsAngle";
            outOfBounds     clamp;
        }
        rotationAxis     ( 0 0 1 );
        rotationOrigin   ( 0 0 0 );
        value            uniform   ( 0 0 0 );
    }
where rotationAxis (constant in time) or rotationAxisSeries (can vary in time) can be specified; similarly, rotationOriginSeries can be specified instead of rotationOrigin, and displacementSeries can superimpose a displacement too.

(2) You could use a rotation boundary condition for the fluid mesh motion field (e.g. pointMotionU): I am not sure if one exists but if not it is probably not that difficult to create.

(3) The FSI algorithm that is currently used alternates between solving the solid and fluid; this means that all processors will solve the solid then solve the fluid etc. So the easiest implementation was to use all cores. If you find that the solid is becoming slow because it has too many cores (spending a lot of time in MPI calls), then you could use a manual decomposition for the solid to keep all the cells on one core.

(4) Yes, more cores means more time communicating, but there is a trade-off: if there is enough work to do (e.g. mesh is large enough), then the optimal balance between parallelisation and minimal MPI communication may be greater than 1 core (obviously communication is zero on 1 core).

(5) It depends on the implementation and choice of parameters e.g. number of stored modes. Possibly/probably the current IQNILS implementation could be made more robust. Also, you can try using a value for "couplingReuse" that is greater than 0 e.g 1-10.

Philip
kcavatar likes this.
bigphil is offline   Reply With Quote

Old   December 3, 2019, 05:38
Default
  #3
New Member
 
Join Date: Mar 2017
Posts: 15
Rep Power: 9
paulbr is on a distinguished road
Hi Phil,
Some news regarding your answer:
1) FixedRotation works nicely, I implemented it to use a mathematical expression instead of a time table.
2) I found a function called angularOscillatingDisplacement which I modified a little bit to "call" it only once per time step (based on timeVaryingVelocity from solids4Foam which uses the variable curTimeIndex). It is working as intended for now.

3-4) Ok, I'll make some more tests for that.
5) Same answer.


However, I'm having some difficulties to make the function pointHistory works and I've seen it commented in the tutorials. The log files gave me this kind of error:
Code:
[1]     From function objectRegistry::lookupObject<Type>(const word&) const
[1]     in file /soft/2016014-foam/foam/foam-extend-4.0/src/foam/lnInclude/objectRegistryTemplates.C at line 139.
[1] 
FOAM parallel run aborting
[1] 
[3] 
[3] 
[3] --> FOAM FATAL ERROR: 
[3] 
    request for fvMesh region0 from objectRegistry 6957947processor3 failed
    available objects of type fvMesh are

2
(
fluid
solid
)
which doesn't make sense because I call my function with the keyword region, like this:
Code:
   beamReport
  {
       type pointHistory;
       region solid;
       functionObjectLibs ("libpointHistory.so");
        refHistoryPoint (0.000 0.002 0.000);
   }
Is there another function that does the same job ? (I'm thinking of solidPointDisplacement, in the functionObjects repertory.)

Regards,

Paul
paulbr is offline   Reply With Quote

Old   December 3, 2019, 06:30
Default
  #4
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,093
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Hi Paul,

Great that you're making progress.

Yes, solidPointDisplacement will do the same as pointHistory and should work.

Philip
bigphil is offline   Reply With Quote

Old   December 4, 2019, 04:51
Default solidPointDisplacement
  #5
New Member
 
Join Date: Mar 2017
Posts: 15
Rep Power: 9
paulbr is on a distinguished road
Hi Philip,

SolidPointDisplacement works fine with serial cases but not with parallel run. I'm guessing the problem comes from these lines and so the function can't find the according nodes, because the file solidPointDisplacement_*.dat is created but updated with zeros only (with parallel runs).
Code:
        // Find global closest point
        const scalar globalMinDist = returnReduce(minDist, minOp<scalar>());
        int procNo = -1;
        if (mag(globalMinDist - minDist) < SMALL)
        {
            procNo = Pstream::myProcNo();
        }
        else
        {
            pointID_ = -1;
        }

        // More than one processor can have the point so we will take the proc
        // with the lowest processor number
        const int globalMinProc = returnReduce(procNo, minOp<int>());
        if (mag(globalMinProc - procNo) > SMALL)
        {
            pointID_ = -1;
        }

        if (pointID_ > -1)
        {
            Pout<< this->name()
                << ": distance from specified point is " << minDist
                << endl;
        }
So I've changed
Code:
if (mag(globalMinProc - procNo) > SMALL)
with
Code:
 if (mag(globalMinProc - procNo) < SMALL)
and it seems to work... I'm not really comfortable with parallel managing, so I don't know if it was an error or not ?
Thank you.


Regards,
Paul
paulbr is offline   Reply With Quote

Old   December 4, 2019, 06:22
Default
  #6
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,093
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Hi Paul,

Your fix is correct: it takes the processor with the highest ID. The original logic is flawed.

I will push a fix to the development branch and subsequently to the master branch once tests have been performed.

Thanks!
Philip
Daniel_Khazaei and paulbr like this.
bigphil is offline   Reply With Quote

Old   December 5, 2019, 13:06
Default Restart with FixedRotation
  #7
New Member
 
Join Date: Mar 2017
Posts: 15
Rep Power: 9
paulbr is on a distinguished road
Hi Philip,

So... it seems that I have spoken too hastily. Restart function is working but I can't make any restart when I'm using FixedRotation. This is the kind of error I have:
Code:
Creating solidTraction boundary condition
    limiter coefficient: 1
    angle is time-varying
[4] --> FOAM FATAL ERROR: 
[4] compound has already been transfered from token
    on line 92 the empty compound of type List<vector>
[4] 
[4]     From function token::transferCompoundToken()
[4]     in file lnInclude/token.C at line 95.
[4] 
 FOAM parallel run aborting
which, if I've understood correctly, tells me that I'm trying to impose two values on the same patch. Am I wrong ? I didn't find any similar error on the forum so I don't really where to look... You might have any hint ?

Thanks again for your time.

Bests,

Paul
paulbr is offline   Reply With Quote

Old   December 9, 2019, 08:29
Default
  #8
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,093
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Hi Paul,

There was a bug for restarting with fixedRotation. I have just fixed this in commit 0da929f to the development branch.

Philip
Daniel_Khazaei and paulbr like this.
bigphil 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
InterFace mismatch in solids4Foam toolkit for HronTurekFSI3 thegauravonline OpenFOAM CC Toolkits for Fluid-Structure Interaction 27 September 17, 2024 13:55
[foam-extend.org] Problems compiling foam-extend-4.0 + fsiFoam on Ubuntu+WSL JBrake OpenFOAM Installation 49 November 5, 2021 12:00
[FSI] solids4Foam vs icoFsiElasticNonLinULSolidFoam on HPC server amuzeshi OpenFOAM CC Toolkits for Fluid-Structure Interaction 7 August 31, 2019 06:26
Error for solving FSI problem by using fsiFoam, thanks. liyanmiho OpenFOAM Running, Solving & CFD 2 March 27, 2019 15:09
[FSI] fsiFoam installation problem Tomko OpenFOAM CC Toolkits for Fluid-Structure Interaction 4 July 14, 2017 15:01


All times are GMT -4. The time now is 17:05.