# Someone uses the OpenFOAM for StressAnalysis?

 Register Blogs Members List Search Today's Posts Mark Forums Read

 February 23, 2012, 13:33 Someone uses the OpenFOAM for StressAnalysis? #1 New Member   Daniel Fraga Sias Join Date: Feb 2012 Posts: 7 Rep Power: 7 Sponsored Links 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? Stress1.jpg Results of commercial software. Screenshot-Kitware ParaView 3.6.1 .jpg Results of OpenFoam.

 February 23, 2012, 13:58 #2 Senior Member     Marco A. Turcios Join Date: Mar 2009 Location: Vancouver, BC, Canada Posts: 733 Rep Power: 21 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.

 February 23, 2012, 14:21 #3 New Member   Daniel Fraga Sias Join Date: Feb 2012 Posts: 7 Rep Power: 7 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.

February 23, 2012, 15:05
#4
New Member

marco
Join Date: Jul 2011
Location: Brasil
Posts: 3
Rep Power: 8
Quote:
 Originally Posted by DanielSias 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)

 February 23, 2012, 18:27 #5 New Member   Daniel Fraga Sias Join Date: Feb 2012 Posts: 7 Rep Power: 7 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?

 February 24, 2012, 06:04 #6 Senior Member     Philip Cardiff Join Date: Mar 2009 Location: Dublin,Ireland Posts: 638 Rep Power: 23 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

 February 24, 2012, 09:09 #7 New Member   Daniel Fraga Sias Join Date: Feb 2012 Posts: 7 Rep Power: 7 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

 February 24, 2012, 09:47 #8 Senior Member     Philip Cardiff Join Date: Mar 2009 Location: Dublin,Ireland Posts: 638 Rep Power: 23 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

 February 27, 2012, 10:16 #9 New Member   Daniel Fraga Sias Join Date: Feb 2012 Posts: 7 Rep Power: 7 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; }

February 27, 2012, 10:41
#10
Senior Member

Philip Cardiff
Join Date: Mar 2009
Location: Dublin,Ireland
Posts: 638
Rep Power: 23
Hi Daniel,

Quote:
 Originally Posted by DanielSias 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 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

 March 4, 2012, 07:18 #11 New Member   Daniel Fraga Sias Join Date: Feb 2012 Posts: 7 Rep Power: 7 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. Thank you by your help.

 March 4, 2012, 18:11 #12 Senior Member     Philip Cardiff Join Date: Mar 2009 Location: Dublin,Ireland Posts: 638 Rep Power: 23 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

 March 5, 2012, 06:36 #13 New Member   Daniel Fraga Sias Join Date: Feb 2012 Posts: 7 Rep Power: 7 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. 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. Daniel

March 5, 2012, 06:57
#14
Senior Member

Philip Cardiff
Join Date: Mar 2009
Location: Dublin,Ireland
Posts: 638
Rep Power: 23
Hi Daniel,

Quote:
 Originally Posted by DanielSias 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 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 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

April 13, 2012, 05:41
#15
Senior Member

Hisham Elsafti
Join Date: Apr 2011
Location: Braunschweig, Germany
Posts: 253
Blog Entries: 10
Rep Power: 10
Hi all

Thanks Phil for all nice info.

Quote:
 Originally Posted by bigphil 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

September 28, 2016, 02:52
fvSchemes: "default leastSquares" vs "leastSquares default"
#16
New Member

Patty
Join Date: Sep 2010
Posts: 13
Rep Power: 8
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 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; }

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36 jola OpenFOAM 2 October 19, 2011 06:55 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 06:25 pete Site News & Announcements 0 June 29, 2009 05:56 oseen OpenFOAM Installation 9 August 26, 2007 13:50