CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Fluid structure interaction on baloons (https://www.cfd-online.com/Forums/openfoam-solving/58845-fluid-structure-interaction-baloons.html)

vinz November 28, 2006 04:44

Hi everibody, After some we
 
Hi everibody,

After some weeks of using OpenFOAM, I'm beginning a new project on fluid structure interaction on a balloon. So far, I've used icoDyMFoam on a cylinder to try the mesh motion, and after a while I finally got a nice osiclating motion (with the development version dowloaded on Frnak Bos website).
Now I have different questions about fluid structure interaction:

a) Does it exist a specific solver (maybe with tutorial case) in te development version (11/09/2006) allowing to treat the FSI?

b)If not, are there solvers that I should combine to make it work? or should I build everything?

c)As a first step, I would like to model my ballon like the rising bubble modeled by Mr Tukovic. Is his work already implemented in OpenFOAM development version?

I know I'm asking a lot but since I'm a beginner in C++, I'm trying to find the easiest tools to use before begining to modify the code (which I will do if there is no other possibilities).
Thanks in advance to any person who will help me.

Vincent

hjasak November 28, 2006 06:26

There is a specific FSI code d
 
There is a specific FSI code developed by dr. Tukovic and myself and it lives in the development line. However, the tutorial case will be held back until the papers are published and further validation is done. I would suggest you contact dr. Tukovic (he is a dr.) and ask him to share his work. Alternatively, you can re-use the components of shared matrix classes, fluids and structure solver and my interpolation stuff to put the solver together from components. Everything is already available in OpenFOAM.

BTW, how do you intend to deal with the stress analysis on a baloon - the stress analysis solver in OpenFOAM will not do shells (unless you wish to add it).

Hrv

vinz November 28, 2006 07:30

Hi, and thanks for the answ
 
Hi,

and thanks for the answer. I just found in the source code the solver named icoFsiFoam. It looks interesting but I have to understand how it works exactly, and to find the files needed to make it work. The work I'm doing at this time is in fact a first approach of the phenomenon. And to answer your question, depending on my results and on the development of OpenFOAM (done by your team or by me), a Phd should be done on this topic.
So I don't know at the moment how I'll deal with the stress analysis. Presently, I'm trying to find more simple cases which could be similar to the balloon study and would already give a good idea about the capacities of OpenFOAM in the domain.
Anyway, I'm going to contact dr. Tukovic (sorry to forget that he was a dr.) and see if he can share his work. It would be of great help to begin my study.

Vincent

vinz December 11, 2006 08:56

Hi Hrv, I contacted dr.Tuko
 
Hi Hrv,

I contacted dr.Tukovic to talk about his bubble rising work. It's working well.
I also wanted to try you icoFsiFoam solver. Since there isn't any tutorial yet, I tried, by reading the code, to create the files needed to make the computation. Due to poor C++ knowledges, I run into troubles. In fact everithing is working fine until the call to readCouplingProperties.H and especialy the request for fvMesh. I end up with the followinf fatal error:

request for fvMesh surface from objectRegistry failed
available objects of type fvMesh are
0
(
)


Looking at the code, I thought I had to create a directory named fvMesh in the directory time 0. However, I don't know what type of files to put inside. Should it be mesh related files like for faMesh in the bubble case?
Thank you in advance for your help.

Regards,

Vincent

ananiev December 19, 2006 04:36

Hi Vincent! The following l
 
Hi Vincent!

The following link may be interesting for you:

http://www.csc.fi/english/pages/elme...oblems/hemodyn


Regards,
Sergey

hjasak December 19, 2006 04:42

Is this OpenFOAM? Because thi
 
Is this OpenFOAM? Because this one is:

http://powerlab.fsb.hr/ped/kturbo/Op.../bentPipeFine/

Hrv

vinz December 19, 2006 04:55

Hi, Thanks for the links. I
 
Hi,

Thanks for the links. I tried with icoFsiFoam, but as you know it's a two regions solver, so it was not enough. Furthermore, I had problems running it since I don't know the files to put in the case directory(constant, system...).
But I found on the openfoam wiki, a nice code wich looks pretty close to icoFsiFoam, named icoStructFoam. This one is working fine.
However, since I wanted a three domains solver (fluid around the balloon, balloon structure and inside fluid) I modified it in order to handle it.
And it's working niccely.
What I didn't like, was that the structure is not auto moving, and I had to use warp function into paraview to make it match the fluid interface.
So I decided to mix icoFsiFoam and icoStructFoam in order to obtain the automatic mesh motion for all domains.
At this time, it's allmost working, but I still have some points which are not matching at the boundary (I don't know why yet, interpolation problem I guess).
Does someone else would be interested in such a solver? Could anyone help me to fix the interpolation problem?

Regards,

Vincent

vinz December 19, 2006 05:16

I forgot to post pictures of t
 
I forgot to post pictures of the boundary problem:
http://www.cfd-online.com/OpenFOAM_D...your_image.gif
http://www.cfd-online.com/OpenFOAM_D...your_image.gif

As you can see, some points of the boundary are not matching. However most of the poins (around80%) do match. Any advise to give me?

hjasak December 19, 2006 05:25

When you are moving the struct
 
When you are moving the structures mesh, you should be using the structural analysis solution to give you the mesh motion.

As for the interpolation, my patch-to-patch interpolation classes should work for all cases. When calculating the interpolation factors, it will check for a direct point-on-point hit and fur such locations simply transfer the value. If the meshes are not matched, proper interpolation will be used instead.

Just for reference, patch-to-patch interpolation will also take care of numbering - there is no need to number the patches in any particular way.

Hrv

guus_kupers January 4, 2007 09:03

Hello everyone, Also I'm ju
 
Hello everyone,

Also I'm just getting started with OpenFOAM and I'm also trying to get icoFsiFoam running. However it appears that I'm having the same problem as Vincent had. I also get the folling error message:


--> FOAM FATAL ERROR :
request for fvMesh interior-3 from objectRegistry failed
available objects of type fvMesh are

0
(
)

I think this problem exist because of the fact that I don't know how to define the movingRegion in the couplingProperties file. Because when I put in solid for movingRegion in the couplingProperties file I get the following error message:

--> FOAM FATAL ERROR :
request for tetPointVectorField motionU from objectRegistry solid failed
available objects of type tetPointVectorField are

0
(
)

However I think solid is not the right region here. And therefore it goes wrong in the next step in readCouplingProperties.H

So can anyone tell me how to define movingRegion in couplingProperties? Or can anyone tell me what the defaultname for a fvMesh is?

Thanks in advance,
Guus

guus_kupers January 15, 2007 03:31

After some trial and error I t
 
After some trial and error I think I made some progress with the icoFsiFoam solver. However I'm still stuck at one point.

For some reason, I don't understand, I get the following message:

--> FOAM FATAL ERROR : Attempt to cast type fixedValue to type fixedValue

From function
refCast<to>(From&)
in file /home/guusk/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/typeInfo.H at line 103.

I don't understand why it is a problem to cast a type fixedValue to a type fixedValue.

I think this problem again originates from the readCouplingProperties.H file namely in the following place:

fixedValueTetPolyPatchVectorField& motionUFuidPatch =
refCast<fixedvaluetetpolypatchvectorfield>
(
motionU.boundaryField()[fluidPatchID]
);

Does someone knows what the problem can be??

Guus

vinz January 15, 2007 04:43

Hi Guus, I spent a while lo
 
Hi Guus,

I spent a while looking into errors that I got from this solver. But solving one was resulting into another one and I didn't succeed to make it work. It's why I finally decided to create my own solver by combining the nice stuff that I found in this solver and other things tooken into the solver named icoStructFOAM (can be found on the wiki).
I also made this solver compressible and added a region in order to be able to treat my balloon problem. Rigth now, I'm trying to solve a three regions problem (fluid, solid, fluid). It's not working so bad.
But I'm asking a lot to my solver since I want to move in a short time a polyethylene structure of 1mm thick! And so far, my code is not stable. I don't give up, it will work.
Finally, the next step to handle this type of problem is to couple OpenFOAM with Impact. In order to be able to treat more complicate problems on a structure point of view.

Vincent

jens_klostermann January 25, 2007 17:13

Hi Guus, How did you resolv
 
Hi Guus,

How did you resolve the fvMesh problem?
Any hints are welcome!

Jens

hjasak January 25, 2007 17:30

What fvMesh problem? Hrv
 
What fvMesh problem?

Hrv

jens_klostermann January 25, 2007 17:50

Hi Hrv, this one By Guus Ku
 
Hi Hrv,

this one By Guus Kupers on Thursday, January 04, 2007 - 07:03 am

How to define the movingRegion in ouplingProperties?

Jens

hjasak January 26, 2007 06:05

Aha, got it: it will be a prob
 
Aha, got it: it will be a problem with the compilation. For historical and efficiency reasons, there are two sets of Finite Element (mesh motion) solvers. The first one uses cell and the second cell-and-face decomposition. It looks like half of the code was compiled with one and the other half with another decomposition.

I know this is pretty poisonous stuff: if you wish to switch from cell to cell-and-face decomposition, you need to recompile EVERYTHING. Choice of decomposition is controlled in ~/OpenFOAM/OpenFOAM-1.3/.cshrc by the two environment variables:

Quote:

setenv WM_DECOMP_INC -DCELL_DECOMP
setenv WM_DECOMP_LIBS -lcellDecompFiniteElement
#setenv WM_DECOMP_INC -DFACE_DECOMP
#setenv WM_DECOMP_LIBS -lfaceDecompFiniteElement
As you can see, I am using cell decomposition at the moment. Nowhere in the code outside the tet FEM solvers should one refer to cell- or face- decomposition headers directly: this is wrapped up in headers.

I don't know how Guus ended up with this error, but a properly built code should work. I can try it out if someone else has got a problem as well.

Hrv

guus_kupers January 26, 2007 06:44

My problem was that I didn't k
 
My problem was that I didn't know how to define movingRegion keyword in the couplingProperties file, for the icoFsiFoam solver. And I still don't know this. However I created a work around in which I create my own createDynamicFvMesh.H. Which looks like this:

Info<< "Create mesh\n" << endl;
autoPtr<dynamicfvmesh> meshPtr
(
dynamicFvMesh::New
(
IOobject
(
"fluid",
dynamicFvMesh::defaultRegion,
runTime.timeName(),
runTime
)
)
);

dynamicFvMesh& mesh = meshPtr();


As you can see I added "fluid", this way you have to put your polyMesh directory for your fluid region in a seperate directory. The advantage now is that you know the name of the fluid region and you can define movingRegion. However I'm still not able to run the icoFsiFoam solver. It might be possible that the new error has to do with the fact that what I'm doing is not allowed. Or there is another reason?

Guus

ztukovic January 26, 2007 07:09

The name of the moving region
 
The name of the moving region depends on the mesh motion type. If the complete mesh moves, use region0. If only a subset moves, use motionSubset

// movingRegion motionSubset;
movingRegion region0;

Zeljko

guus_kupers January 26, 2007 07:35

This indeed works!! Thanks...
 
This indeed works!! Thanks...

But I still get another error that I mentioned before (january 15th). Which is:

-> FOAM FATAL ERROR : Attempt to cast type fixedValue to type fixedValue

I don't understand why it is a problem to cast a type fixedValue to type fixedValue.

Guus

hjasak January 26, 2007 08:48

ON, a direct question requires
 
ON, a direct question requires a direct answer. Here is a list of objects in OpenFOAM that represent a fixed value boundary:

Quote:

./finiteArea/fields/faPatchFields/basicFaPatchFields/fixedValue/fixedValueFaPatc hField.H
./OpenFOAM/fields/pointPatchFields/basicPointPatchFields/fixedValue/fixedValuePo intPatchFields.H
./tetDecompositionFiniteElement/tetPolyPatchFields/basicTetPolyPatchFields/fixed Value/fixedValueTetPolyPatchFields.H
./finiteVolume/fields/fvPatchFields/basicFvPatchFields/fixedValue/fixedValueFvPa tchField.H
./OpenFOAM/fields/PointPatchFields/BasicPointPatchFields/FixedValue/FixedValuePo intPatchField.H
They are all identified by the word fixedValue and you are mixing two of them.

More specifically, you are mixing:

Quote:

FixedValuePointPatchField<tetpolypatchfield,>
and

Quote:

FixedValuePointPatchField<tetpolypatchfield,>
Helps? (unfortunately, the forum software messes up the details of instantiation: the first one is on tetPolyPatchCellDecomp and the second on tetPolyPatchFaceDecomp.

I think I have already explained how to fix it: rebuild the executable.

Hrv

jens_klostermann January 26, 2007 17:25

My OF version is build all wit
 
My OF version is build all with cell decomposition.

Thanks to Zjelko the couplingProperties problem is solved.

But there is another strange thing, I can only use GaussSeidel as solver for U, since this is the only solver for symmetric and assymetric matrizes.
Otherwise if I use ICCG or AMG it asks for BICCG or BDCG and vice versa. How does this come?

Jens

hjasak January 26, 2007 17:43

It's not that bad: have anothe
 
It's not that bad: have another look.

There are two fvSolution dictionaries in the case: one in system/fvSolution and another in system/solid/fvSolution so you can control the dictionaries separately. The one in "solid" is (of course) for a solid and all should be well.

If you are not picking up the proper solver, it is possible that your solid U field (requiring a symmetric solver) is hooked onto the wrong mesh, but I doubt it.

Hope this helps,

Hrv

jens_klostermann January 26, 2007 18:26

Thanks Hrv, next question:
 
Thanks Hrv,

next question: Can I run the icoFsiFoam in parallel?

Jens

guus_kupers January 27, 2007 05:29

I recompiled everything and no
 
I recompiled everything and now it works. Thanks Hrv!!

lr103476 January 27, 2007 08:26

Well done Guus! Looking forwar
 
Well done Guus! Looking forward to your first fsi results! Maybe you can post some of your results here to share your experiences:-)

Regards,
Frank

vinz February 6, 2007 09:55

Hi everybody, I'm still wor
 
Hi everybody,

I'm still working on the development of my fluid structure interaction code. At this time, I'm begining the coupling with the open source code Impact.
Thus, I have a question which might look obvious for some of you, but I don't know how to do it.
So far, I've been using a constant vectorField defined by:
vectorField fluidPatchPointsDispl = vectorField(224, vector(0,1e-02,0));
However I would like to be able to define this vectorField by reading a file which I'd put in a correct directory, like when we define the velocity field for instance, using a dictionary. Which would be the code to define such a vectorField?

Thanks in advance,
Regards,

Vincent

deinstein February 6, 2007 12:04

Hi Vincent, Could you pleas
 
Hi Vincent,

Could you please give me a link for "Impact"?

Dan

vinz February 6, 2007 12:18

Hi Dan, here it is: http:/
 
Hi Dan,

here it is:
http://impact.sourceforge.net/

you'll find number of informations ther.

Vincent

vinz February 7, 2007 11:15

Hi, Forget the story of vec
 
Hi,

Forget the story of vectorField. I found a way to do what I wanted.
Now, I have another problem. I would like to find a way to know the coordinates of the points which are on a boundary and their ordering inside a field.
For example, if I have a velocity field with four points, OpenFOAM can easily write the values. But I would like to know to which point of the mesh belongs the first value, to wich point belongs the second value....
Is there a way to do that? The idea would be a function mesh.boundaryfield()[boundary1] which would return the coordinates of the points on the boundary1. But I haven't been able to find it in the code. Does such a thing allready exist?

Thanks for your help,

Vincent

vinz February 26, 2007 09:16

Hi everybody, This is the e
 
Hi everybody,

This is the end of my internship and I have finished my thesis report. So I give the url if some people are interested in the work that I have done on FSI on balloons and also the converter GridPro2FOAM which is largely explained in the report.
The beginning of the report won't be very interesting for many of you since it is just OpenFOAM tutorials, but the second part of the report is more on FSI and also the beginning of coupling between OF and Impact.
Unfortunately, it's only the beginning since I spent a lot of time on the discovery and testing of OpenFOAM capacities. As you can imagine, six months of internship is really short!
Anyway, if you have any questions or comments, don't hesitate.
The report can be downloaded there: Thesis report

Best regards,

Vincent

vinz February 28, 2007 02:48

Hi everybody, As explained
 
Hi everybody,

As explained sooner in this topic, I have to find the points which own to a specific boundary.
I found a way to do it in 2D doing:
mesh.boundaryMesh()[internalPatchID].boundaryPoints()

However, this is not working in 3D and, even if I have an idea, I don't really understand why it is not working.
So, does someone have an idea of how to fix it?
Thanks in advance,

Vincent

vinz March 1, 2007 02:34

Hi Frank, Thanks for your h
 
Hi Frank,

Thanks for your hint. Finnaly I don't do exactly the same way but the localPoints() fonction helped me.
For information my code is now:
vectorList boundarypoint(n);

forAll (mesh1.boundaryMesh()[internalPatchID].localPoints(), j)
{
boundarypoint[j] = mesh1.boundaryMesh()[internalPatchID].localPoints()[j];
}

And this is working pefectly fine which is great since I can now deform my balloon shape in 3D.
By the way, do you plan to update your website soon? I would be really interested in the results that you obtain on moving meshes.

Best regards,

Vincent

lakeat April 23, 2007 22:46

Hi Dear Foamers, where can
 
Hi Dear Foamers,

where can i get icoFsiFoam?
I searched everywhere and cannt find it. is it replaced with another solver now(version 1.4)?
And could anyone tell me what's the difference between icoFsiFoam and icoStructFoam?
Thanks in advancehttp://www.cfd-online.com/OpenFOAM_D...part/happy.gif

Daniel

dmoroian April 25, 2007 06:00

Hi Daniel, I think the icoFsi
 
Hi Daniel,
I think the icoFsiFoam solver comes only with the development version 1.3 from prof. Jasak. Try there!

Dragos

guus_kupers April 25, 2007 06:48

Hi all, I think that there'
 
Hi all,

I think that there's not a big difference between the two solvers. There are some differences involving mesh motion and coupling.

And indeed icoFsiFoam is not (yet) available for OF-14.

Guus

lakeat April 25, 2007 07:26

Hi Dragos and Guus, Thanks
 
Hi Dragos and Guus,

Thanks for your reply, Much appreciatedhttp://www.cfd-online.com/OpenFOAM_D...part/happy.gif
When will it be available?(why not make it available) ...I will try to work on it for my thesis.
now, I have a copy of icoStructFoam and turbForceFoam, but i'm very new to Foam and i dont know is it impossible to combine LES (oodles) with such and such to solve FSI.
Any suggestion?

Daniel

jin_xu June 2, 2008 20:47

Hi, everybody, I am just ge
 
Hi, everybody,

I am just gettine started with linux and OpenFoam. , also trying to run icoFsiFoam. After spending several days studying the solver and piecing togther the messages posted before, I think I have made some progress, but I still run into the same problems posted "By Guus Kupers on Monday, January 15, 2007 - 01:31 am".

--> FOAM FATAL ERROR : Attempt to cast type fixedValue to type fixedValue

From function
refCast<to>(From&)
in file /home/snail/OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/typeInfo.H at line 103.

I realize that I should rebuild the executable of tetPolyPatchCellDecomp and tetPolyPatchFaceCellDecomp. then I type:

snail@snail-laptop:~/OpenFOAM/OpenFOAM-1.3/src/tetDecompositionFiniteElement/tetPolyMeshCellDecomp /tetPolyPatches/tetPolyPatch$ gcc tetPolyPatchCellDecomp.C

and I end up with errors:

snail@snail-laptop:~/OpenFOAM/OpenFOAM-1.3/src/tetDecompositionFiniteElement/tetPolyMeshCellDecomp /tetPolyPatches/tetPolyPatch$ gcc tetPolyPatchCellDecomp.C

In file included from tetPolyPatchCellDecomp.C:27:
tetPolyPatchCellDecomp.H:39:23: error: labelList.H: No such file or directory
tetPolyPatchCellDecomp.H:40:25: error: vectorField.H: No such file or directory
tetPolyPatchCellDecomp.H:41:25: error: triFaceList.H: No such file or directory
tetPolyPatchCellDecomp.H:76: error: expected identifier before string constant
tetPolyPatchCellDecomp.H:76: error: expected ',' or '...' before string constant
tetPolyPatchCellDecomp.H:76: error: ISO C++ forbids declaration of 'TypeName' with no type
tetPolyPatchCellDecomp.H:99: error: ISO C++ forbids declaration of 'word' with no type
tetPolyPatchCellDecomp.H:99: error: 'word' declared as a 'virtual' field
tetPolyPatchCellDecomp.H:99: error: expected ';' before '&' token
tetPolyPatchCellDecomp.H:102: error: 'label' does not name a type
tetPolyPatchCellDecomp.H:105: error: 'label' does not name a type
tetPolyPatchCellDecomp.H:108: error: 'label' does not name a type
tetPolyPatchCellDecomp.H:117: error: ISO C++ forbids declaration of 'labelList' with no type
tetPolyPatchCellDecomp.H:117: error: 'labelList' declared as a 'virtual' field
tetPolyPatchCellDecomp.H:117: error: expected ';' before '&' token
tetPolyPatchCellDecomp.H:120: error: ISO C++ forbids declaration of 'vectorField' with no type
tetPolyPatchCellDecomp.H:120: error: 'vectorField' declared as a 'virtual' field
tetPolyPatchCellDecomp.H:120: error: expected ';' before '&' token
tetPolyPatchCellDecomp.H:123: error: ISO C++ forbids declaration of 'vectorField' with no type
tetPolyPatchCellDecomp.H:123: error: 'vectorField' declared as a 'virtual' field
tetPolyPatchCellDecomp.H:123: error: expected ';' before '&' token
tetPolyPatchCellDecomp.H:127: error: 'triFaceList' does not name a type
tetPolyPatchCellDecomp.H:130: error: 'faceList' does not name a type
tetPolyPatchCellDecomp.C:36: error: expected identifier before numeric constant
tetPolyPatchCellDecomp.C:36: error: expected ',' or '...' before numeric constant
tetPolyPatchCellDecomp.C:36: error: expected constructor, destructor, or type conversion before ';' token

As I am also a beginner of linux, I am not sure my way of rebuliding the executable is correct, Could anyone give me some hints?

Thanks in advance!

jin

jin_xu June 3, 2008 10:03

hello again, I think I solv
 
hello again,

I think I solved this problem using "./Allmake"(I should have seen it).

jin

viraj20feb September 14, 2016 12:38

Quote:

Originally Posted by hjasak (Post 191750)
ON, a direct question requires a direct answer. Here is a list of objects in OpenFOAM that represent a fixed value boundary:



They are all identified by the word fixedValue and you are mixing two of them.

More specifically, you are mixing:



and



Helps? (unfortunately, the forum software messes up the details of instantiation: the first one is on tetPolyPatchCellDecomp and the second on tetPolyPatchFaceDecomp.

I think I have already explained how to fix it: rebuild the executable.

Hrv


Hello,

I am trying to use icoFsiFoam for blood flow in an artery. As I give the command, the simulation stops immediately without any error message at the following step:

Create time

Create dynamic mesh for time = 0

Selecting dynamicFvMesh dynamicMotionSolverFvMesh
Selecting motion solver: laplace
Selecting motion diffusivity: quadratic
Reading transportProperties

Reading field p

Reading field U

Reading/calculating face flux field phi

Reading field U

Reading mechanical properties

Normalising E : E/rho

Calculating Lame's coefficients

Can anyone help?


All times are GMT -4. The time now is 20:46.