CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   StressedFoam (

CFD_buw June 16, 2011 13:31

Dear members,
I have problems with stressedFoam. I generated a cube with a fixed beam inside. For the mesh generation I just used blockMesh. Then I implemented a pressure which acts on the beam. With the help of sampleDict I am able to read out the displacements in x, y and z direction. The problem is, that my analytical solution results in a different value.
The pressure is 650000 N/m^2 , the length of the beam is 0.2, the cross section is 0.008 m * 0.008 m and the youngs modulus E = 2 * 10 ^11 N/m^2.
My analytical solution for the maximal displacement is 3.174 * 10^-4 m but OpenFoam results in 1.215*10^-5 m.
Has somebody experience with this problem and can somebody give me a good hint?

Warm regards and thank You!

bigphil June 16, 2011 16:14


Where are you loading your geometry? what are all the boundary conditions?

Also what analytical solution are you using?


CFD_buw June 16, 2011 16:36

Hello bigphil,

thank You for Your fast replay.
The analytical solution is calculated with the normal bending beam which is fixed on both ends. After calculating the defelxion curve I can determine the maximum displacement in the middle of the beam.

The boundary conditions are:
The surrounding walls of the cube have a zeroGradient.
The pressure field is constant with a value of 650000 N/m^2.

I am loading the geometry in paraview and I am able to see the right behaviour. The magnitude of the displacement U is a maximum in the middle of the beam. But unfortunately the value is really small. The dimension are already checked...

Warm regards.

bigphil June 18, 2011 12:55


Are you sure you want to use the zeroGradient BC, it doesn't really have a physical interpretation for a displacement solver (well maybe it's equivalent to a zero strain condition), if you want a traction/stress-free BC at the solids walls then you should use the tractionDisplacement BC and set the traction and pressure to zero.


CFD_buw June 19, 2011 04:03

Hey Phillip,

I will try to change it on Tuesday and will post You my experiences. Generally, if I think about the boundaries, then You should be right with Your idea. Lets see ...

Warm regards.

marzbali November 10, 2011 18:27


Does wall boundary exist in stressedFoam? I mean when a face is fixed and cannot move then what boundary condition should be used? The zero traction apparently is used for free end of the beam not the fixed end, right?
I apologize for my poor knowledge in solid mechanics, since I only worked with fluid solvers:)


bigphil November 10, 2011 19:01

Hi Marzbali,

You can fix a solid boundary using fixedValue in your displacement boundary conditions (0/U or 0/D):

type fixedValue;
value uniform (0 0 0);


marzbali November 10, 2011 22:16

Hi Philip,

Thanks for your quick reply. yeah, that makes sense. The reason that I'm asking is because I'm simulating the deformation of a disk subject to a pressure force with a 2D axisymmetric model in stressedFoam. For the top and bottom surfaces tracionDisplacement is used and the periphery of the disk doesn't move so fixedValue should be used. I have divergence problem now because motionU reaches 1e35 after 1 iteration! Have you had a similar case before?


bigphil November 11, 2011 10:14


motionU... does that mean you are using icoFsiFoam the extend version of OpenFOAM?

As far as I can see motionU is the motion of the fluid mesh, so maybe the motion of the fluid mesh is too extreme, I'm not sure without knowing more about the case and solver.


marzbali November 11, 2011 11:49

1 Attachment(s)
Hi Philip,

Yes, actually I'm using interFsiFoam solver in OF-1.5-dev. I'm modeling impact of a water droplet on SS disk. So the geometry is axisymmetric and simply two domains with the same size and cells on top of each other. I have attached the output if you'd like to have a look. If you want I can upload the case here so you can try it, please let me know.


bigphil November 11, 2011 12:35


OK looking at your stress residuals:

PCG: Solving for Ux, Initial residual = 0.401083, Final residual = 0.00399601, No Iterations 43
PCG: Solving for Uy, Initial residual = 0.406038, Final residual = 0.00313817, No Iterations 34
PCG: Solving for Uz, Initial residual = 0.429895, Final residual = 0.00335018, No Iterations 34
They have not converged at all, they are still about 0.4, they should be 1e-6.

What kind of mesh are you using for your solid? Maybe it would be good if you upload your case.


marzbali November 11, 2011 12:46


The mesh is structured wedge type and uniformly distributed. Its size is 25 microns. You can see the case in the attachment.


bigphil November 11, 2011 13:07


"checkMesh" fails on your solid mesh.
How did you create the axisymmetric mesh? There should not be an axis patch (patches are only for faces, you can only apply boundary conditions to faces in the cell centred finite volume method).
So I think there is some special way to make an axialMesh maybe something like this utility, but I haven't tried it.


marzbali November 11, 2011 13:26


You brought up a very good point. I forgot to check the solid mesh and you're right it fails. I defined both front and back wedges in one patch and apparently in this case they have to be separated. I divided them to 2 patches and it's running now. Let's see if it converges or not!!
Regarding the axis patch, I saw in nozzleFlow2D tutorial that axis is defined with only two vertices but basically it is a face with zero area. It would work when it is set to empty.

Thanks a million for your help and best regards.

bigphil November 11, 2011 13:37

OK great,
hopefully it works.


All times are GMT -4. The time now is 09:22.