CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Someone uses the OpenFOAM for StressAnalysis? (http://www.cfd-online.com/Forums/openfoam/97742-someone-uses-openfoam-stressanalysis.html)

 DanielSias February 23, 2012 13:33

Someone uses the OpenFOAM for StressAnalysis?

2 Attachment(s)
I'm trying to solve the problem example of the solver "solidDisplacementFoam" where I adopted some elements in the depth of the plate. When I compare the results of the OpenFoam with the results of the commercial software, they are not equal.
Can anyone help me?

Attachment 11482
Results of commercial software.
Attachment 11481
Results of OpenFoam.

 mturcios777 February 23, 2012 13:58

Because the distribution looks similar and only the order of magnitude is different, are you sure that the ICs and BCs are identical? Just a thought, I don't usually do solid mechanics.

 DanielSias February 23, 2012 14:21

Yes, I set two planes of symmetry and only one uniform plan for displacement. Checked the dimensions of the model to ensure that similarity. The only difference between the example of tutorial/OpenFOAM and the my case is that I do not consider thin plate.

 mattedi February 23, 2012 15:05

Quote:
 Originally Posted by DanielSias (Post 345987) I'm trying to solve the problem example of the solver "solidDisplacementFoam" where I adopted some elements in the depth of the plate. When I compare the results of the OpenFoam with the results of the commercial software, they are not equal. Can anyone help me? Attachment 11482 Results of commercial software. Attachment 11481 Results of OpenFoam.

Did you check if the stress are the same ?? its seems that one is normal stress and the other is principal stress S1(sigmaxx)

 DanielSias February 23, 2012 18:27

This case is similar to the example presented in the tutorial/solidDisplacementFoam, but I'm not considering thick plate and thin plate. The displacement in the X direction is equal in both analyzes (trade vs OpenFOAM). Already tensions are not equal in any direction. This "solver" only works for thin plate?

 bigphil February 24, 2012 06:04

Hi Daniel,

solidDisplacementFoam should fine for thick and thin plate. I have compared many small strain elastic cases between OF and Analytical solutions as well as commercial solvers like Abaqus and the results are always very close.

What are all the boundary conditions you are using? Are you using tractionDisplacement for the tractionFree surfaces? It should be possible to find an analytical solution for this case too.

Philip

 DanielSias February 24, 2012 09:09

Hi Philip,

In this case, the boundary conditions are:
In the traction surface, I put fixedValue for prescribed displacement and in the free surfaces I put tractionDisplacement. But I don't know if there the conditions are valid for the solidDisplacement solver.
In this case, the boundary conditions are:
boundaryField
{
hole
{
type tractionDisplacement;
traction uniform ( 0 0 0 );
pressure uniform 0;
value uniform (0 0 0);
}
traction
{
type fixedValue;
value uniform (1 0 0);
}
symmetry_b
{
type symmetryPlane;
}
symmetry_l
{
type symmetryPlane;
}
top
{
type tractionDisplacement;
traction uniform ( 0 0 0 );
pressure uniform 0;
value uniform (0 0 0);
}
frontAndback
{
type tractionDisplacement;
traction uniform ( 0 0 0 );
pressure uniform 0;
value uniform (0 0 0);
}
}

Daniel

 bigphil February 24, 2012 09:47

Hi Daniel,

Your model is not constrained in the frontAndBack direction i.e. you have set the front and back as traction free so there is nothing constraining the model from moving in this direction, in general this is not good for a steady-state analysis. I would set the the back to be symmetry plane and the front to traction free and half the thickness of your model.

Has the model converged? What are the settings in your fvSolution file?
Also if you post your fvSchemes file if could help diagnose the problem?

Philip

 DanielSias February 27, 2012 10:16

Hi Philip,

Very interesting the suggestion, to use 1/8 geometry. But if I can not make this simplification in other geometry? I can not use the conditions in this way?
Below is the files:
fvSolution
solvers
{
D
{
GAMG solver;
tolerance 1e-06;
relTol 0.9;
GaussSeidel smoother;
cacheAgglomeration true;
nCellsInCoarsestLevel 20;
agglomerator faceAreaPair;
mergeLevels 1;
}

T
{
GAMG solver;
tolerance 1e-06;
relTol 0.9;
GaussSeidel smoother;
cacheAgglomeration true;
nCellsInCoarsestLevel 20;
agglomerator faceAreaPair;
mergeLevels 1;
}
}

stressAnalysis
{
compactNormalStress yes;
nCorrectors 1;
D 1e-06;
}

fvScheme
d2dt2Schemes
{
}

{
leastSquares default;
}

divSchemes
{
default none;
}

 bigphil February 27, 2012 10:41

Hi Daniel,

Quote:
 Originally Posted by DanielSias (Post 346469) Very interesting the suggestion, to use 1/8 geometry. But if I can not make this simplification in other geometry? I can not use the conditions in this way?
In steady case problems, the model should always be properly constrained, the same goes for commercial FE packages. In transient analysis, the inertia keeps everything stable assuming a small enough time-step.
What do you plan to model?

Quote:
 Originally Posted by DanielSias (Post 346469) stressAnalysis { compactNormalStress yes; nCorrectors 1; D 1e-06; }
The nCorrectors should be much larger, I would typically set it to 5000. This will ensure that the model is converged for each time step.

The reason nCorrectors is set to 1 in the tutorial case is because the steady state results are achieved through multiple time steps (where the results are not converged for intermediate time-steps).

Philip

 DanielSias March 4, 2012 07:18

Hi Philip,
Sorry by not responding earlier.
I making various tests with the solvers of the versions OF-1.6 and OF-1.6-ext.
His suggestion was very good. My result are not perfect, but much improved. Also I noticed a big difference between the results of the two versions.
The results of version OF-1.6-ext are much better.
Now, I have explored the schemes of discretizations for improve of results.

 bigphil March 4, 2012 18:11

That is good that your results are much improved. It is strange that you are getting different results with the different OF versions, they should be the same.

If you give more details on your case, I am happy to give suggestions on improving results and/or figure out why you might be getting different results with different versions.

Philip

 DanielSias March 5, 2012 06:36

Hi Philip,

A colleague suggested that the difference is only in the results viewer Paraview.
The case I'm running is the same. A plate with a hole with two planes of symmetry. The same example of the OpenFOAM but I'm assuming it thick.

divSchemes
{
default none;
}
This change came over my results than I expected.

Daniel

 bigphil March 5, 2012 06:57

Hi Daniel,

Quote:
 Originally Posted by DanielSias (Post 347662) A colleague suggested that the difference is only in the results viewer Paraview.
OK, yes that could be the case.

Quote:
 Originally Posted by DanielSias (Post 347662) The case I'm running is the same. A plate with a hole with two planes of symmetry.
Essentially this is a 2D plane strain case, it would be quicker if you set the front and back to be empty and then set planeStress to no in constant/rheologyProperties.
I would expect the solver to be very good and accurate in this case.

Quote:
 Originally Posted by DanielSias (Post 347662) Recently I made a change in the method of div (sigmaD). divSchemes { default none; // div(sigmaD) Gauss linear; div(sigmaD) Gauss midPoint; } This change came over my results than I expected.
Hmmnn, are your sure you want to do this... this will use symmetric interpolation when calculating the divergence field which is only correct on a uniform grid. linear is the best option here (linear is the same as midPoint on uniform grids). You could maybe use Gauss skewCorrected linear (the linear interpolation include skewness correction) but it doesn't really make that much difference.

Your fvSchemes shown in a previous post is optimal for solid mechanics. The only thing you might change is the timeScheme for transient simulations (steadyState -> Euler) or the grad scheme when the mesh is a problem (leastSquares, Gauss linear or maybe extendedLeastSquares).

Philip

 Hisham April 13, 2012 05:41

Hi all

Thanks Phil for all nice info.

Quote:
 Originally Posted by bigphil (Post 347669) Hi Daniel, Essentially this is a 2D plane strain case, it would be quicker if you set the front and back to be empty and then set planeStress to no in constant/rheologyProperties. I would expect the solver to be very good and accurate in this case. Philip
I guess a plane strain will not be suitable for this case because the strain out-of-plane will be set to zero, which in turn will reduce the in-plane deformation of the plate and reduce in-plane stresses as well!

Another thing, I guess fixing the displ. @ the boundary to (1, 0, 0) give sufficient constraint to the problem in the out-of-plane direction (displ. set to zero at both plate ends)

@DanielSias: I know this may sound stupid ... but have you checked that you have the same material parameters?

Best regards
Hisham El Safti

 ptbs September 28, 2016 02:52

fvSchemes: "default leastSquares" vs "leastSquares default"

Hi

Reading this discussion on setting fvSchemes parameters, I am suprised to see DanielSias setting e.g. for gradSchemes a line stating:
"leastSquares default;". Isn't it "default leastSquares;" or does openFoam understand both syntax?

This inversion is regularly applied by DanielSias in this post.

Best regards

Bruno

Quote:
 Originally Posted by DanielSias (Post 346469) Hi Philip, Very interesting the suggestion, to use 1/8 geometry. But if I can not make this simplification in other geometry? I can not use the conditions in this way? Below is the files: fvSolution solvers { D { GAMG solver; tolerance 1e-06; relTol 0.9; GaussSeidel smoother; cacheAgglomeration true; nCellsInCoarsestLevel 20; agglomerator faceAreaPair; mergeLevels 1; } T { GAMG solver; tolerance 1e-06; relTol 0.9; GaussSeidel smoother; cacheAgglomeration true; nCellsInCoarsestLevel 20; agglomerator faceAreaPair; mergeLevels 1; } } stressAnalysis { compactNormalStress yes; nCorrectors 1; D 1e-06; } fvScheme d2dt2Schemes { SteadyState default; } gradSchemes { leastSquares default; grad (D) leastSquares; grad (T) leastSquares; } divSchemes { default none; div (sigmaD) Gauss linear; }

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