CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM CC Toolkits for Fluid-Structure Interaction (https://www.cfd-online.com/Forums/openfoam-cc-toolkits-fluid-structure-interaction/)
-   -   [solids4Foam] Does FSI work with OpenFOAM-v1812 ? (https://www.cfd-online.com/Forums/openfoam-cc-toolkits-fluid-structure-interaction/226110-does-fsi-work-openfoam-v1812.html)

monnda April 17, 2020 10:52

Does FSI work with OpenFOAM-v1812 ?
 
Hello everyone!

Now I know solids4Foam compiles with OpenFOAM-v1812 or OpenFOAM-7 so I'm trying to run tutorials with v1812. But I have a problem of running the flexibleDamBreak case (I think other tutorials have the same problem too) where I get a following error when I select AMI for interface interpolation.

Quote:

cannot dereference nullptr at index 0 in range [0,42)

From function T& Foam::UPtrList<T>::operator[](Foam::label) [with T = Foam::Field<double>; Foam::label = int]
in file /uhome/y90005/OpenFOAM/OpenFOAM-v1812-gcc/src/OpenFOAM/lnInclude/UPtrListI.H at line 218.

FOAM aborting
I understand porting work from foam-extend version is still ongoing but there might be just missing something in my case. I would appreciate if someone could help me with this.

Thank you!

monnda April 17, 2020 11:10

1 Attachment(s)
Here is the flexibleDamBreak tutorial that I have modified a bit to be able to run with OpenFOAM-v1812.

bigphil April 17, 2020 11:17

Hi monnda,

Yes, you are correct that soldis4foam compiles with OpenFOAM-v1812 and OpenFOAM-7. Making the tutorials compatible is on the to-do list. As of know, the only compatible tutorial is:
Code:

solids4foam/tutorials/fluidSolidInteraction/beamInCrossFlow/linearGeometryElasticBeam.openfoam
If you compare this to the standard linearGeometryElasticBeam then it will give you an idea of the type of changes required at the case level.

Philip

monnda April 17, 2020 11:59

Thank you, Phillip!

I didn't know there is a tutorial for v1812! This will help a lot.

But I just tried to run the case with AMI for interfaceTransferMethod and I still got the same error above. So I guess that the solver is not yet developed to run with AMI. In the tutorial case, mesh is perfectly conformal at the interface so it can be run with directMap method but I need to run with AMI or RBF because in my case mesh is actually not conformal between solid and fluid.

Tutorials can be run with RBF with no problems but for may case I got the following error.
Quote:

terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Probably I get this error because my mesh is too big?

Is there any way that I can run my case with RBF or AMI?

bigphil April 17, 2020 12:38

RBF can become very memory hungry. I suggest monitoring your RAM for your case to check if the error comes from that, but I think that is probably the case.

As regards using AMI, for OpenFOAM-v1812 it should work with "AMI": I think it is currently called GGI_AMI (I need to correct this to AMI). The tutorials runs for me with it. I think AMI may not be working for OpenFOAM-7 yet.

Also, I just noticed for OpenFOAM-v1812, I had to add "libs ("libfvMotionSolvers.so");" to the controlDict for the tutorial to work.

Best,
Philip

monnda April 18, 2020 00:37

I cannot run the tutorial with AMI with v1812 somehow. I get the same error I showed above first. It is okay to just select "AMI" in fsiProperties like below, right?
Quote:

interfaceTransferMethod AMI;

Daniel_Khazaei April 18, 2020 06:59

1 Attachment(s)
Quote:

Originally Posted by bigphil (Post 766176)
As regards using AMI, for OpenFOAM-v1812 it should work with "AMI": I think it is currently called GGI_AMI (I need to correct this to AMI). The tutorials runs for me with it. I think AMI may not be working for OpenFOAM-7 yet.

Hi,

AMI should also work on OpenFOAM-7 as we (if you remember) have fixed the problem a few month ago. I tested HronTurekFsi3 case and it works as expected although skew-corrected scheme produces spurious damping on OpenFOAM-7.

You can find the modified case below.

Regards,
D. Khazaei

monnda April 19, 2020 05:44

Hello,

To get AMI interface interpolation run with OpenFOAM-v1812, I changed the macro in amiInterfaceToInterfaceMapping.C like below. Just exchanged OPENFOAMESI with OPENFOAMFOUNdATION. Now I am glad that the problem is solved but is this a bug in the code? if it isn't, maybe I have something wrong in my code.
Quote:

//#ifdef OPENFOAMESI
#ifdef OPENFOAMFOUNDATION
zoneAPointWeights[pointI] = List<scalar>(3);
#else
zoneAPointWeights.set(pointI, new scalarField(3));
#endif


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