- **OpenFOAM**
(*http://www.cfd-online.com/Forums/openfoam/*)

- - **Steady-state thermal stress analysis by using solidDisplacementFoam**
(*http://www.cfd-online.com/Forums/openfoam/106502-steady-state-thermal-stress-analysis-using-soliddisplacementfoam.html*)

Steady-state thermal stress analysis by using solidDisplacementFoamHello everybody,
I am using OpenFoam 1.7 for solving thermal stress problem. Now I am solving some simple 2D cases and comparing with analytical solution. In this case there is a beam of length l and a rectangular cross section whose both ends are clamped as shown as below: fixedEnd1 I-------------------I finxedEnd2 In this problem, initial temperature of beam is constant. Temperatures T and –T is rising and decreasing in the lower and upper surfaces respectively. I am using solidDisplacmentFoam for solving this case. I have following concerns: 1. I am doing this problem for steady-state therefore I have changed ddt schemes as steady state in system/fvScheme. Do I need to make more changed for getting steady state solution in solidDisplacementFoam? 2. Analytical solution for this case is 2.52e+08 at upper surface and -2.52e+08 at lower surface. My simulation results are around 2.25e+08 at upper surface and -2.25e+08 at lower surface. I am not getting accurate simulation results as compared to the analytical values. What do I need to do for getting good simulation results? I appreciate if someone could help me to solve this problem. Below is my test case, so that someone more experienced than me with OpenFoam con give a hint. Best regards and thanks in advance for any reply sar_gam05 0/Ddimensions [0 1 0 0 0 0 0]; internalField uniform (0 0 0); boundaryField { topSurface { type tractionDisplacement; traction uniform (0 0 0); pressure uniform 0; value uniform (0 0 0); } bottomSurface { type tractionDisplacement; traction uniform (0 0 0); pressure uniform 0; value uniform (0 0 0); } fixedEnd1 { type fixedValue; value uniform (0 0 0); } fixedEnd2 { type fixedValue; value uniform (0 0 0); } defaultFaces { type empty; } } 0/Tdimensions [0 0 0 1 0 0 0]; internalField uniform 0; boundaryField { topSurface { type fixedValue; value uniform -100; } bottomSurface { type fixedValue; value uniform 100; } fixedEnd1 { type zeroGradient; } fixedEnd2 { type zeroGradient; } frontAndBack { type empty; } } blockMeshconvertToMeters 1; vertices ( (0 0 0) (30 0 0) (30 10 0) (0 10 0) (0 0 0.1) (30 0 0.1) (30 10 0.1) (0 10 0.1) ); blocks ( hex (0 1 2 3 4 5 6 7) (150 100 1) simpleGrading (1.0 1.0 1.0) ); edges ( ); patches ( patch topSurface ( (3 7 6 2) ) patch bottomSurface ( (4 0 1 5) ) patch fixedEnd1 ( (0 4 7 3) ) patch fixedEnd2 ( (1 2 6 5) ) ); mergePatchPairs ( ); |

Hi Sargam,
Quote:
Quote:
Philip |

3 Attachment(s)
Quote:
Hi Philip, Thanks for the reply. Yes, I have used multiple time steps to get converged solution. I have gotten converged solution for this problem. Please find my test case, and system files as an attachment. I can not able to attach full log file because it is large in size therefore I am sending you some last iterations in log file that will help to show converged solution. Please feel free to give suggestions. Thanks, Sargam |

Hi Sargam,
I notice that your model is only converged to a residual of 1.5e-5. Normally I would converge my solid models to at least 1e-6. I recommend that you converge the model the a tighter tolerance (1e-6, 1e-7 or maybe even tighter and see if there is an effect). You could solve the model in one time-step if you change the number of outer correctors in your fvSolution: stressAnalysis { compactNormalStress no; thermalStress yes; nCorrectors 100000;D 1e-06; T 1e-06; } Also changing the linear solver relative tolerance to about 0.1 is normally optimum for solid models, and change the tolerance tighter than your solution tolerance: D { solver GAMG; tolerance 1e-08;relTol 0.1;smoother GaussSeidel; cacheAgglomeration true; nCellsInCoarsestLevel 20; agglomerator faceAreaPair; mergeLevels 1; } Are you using the exact same boundary conditions as the analytical solution? i.e. are top and bottom traction-free and are the left and right fixed in every direction or fixed only in their normal direction with zero-shear. Philip |

1 Attachment(s)
Quote:
Hi Philip, Thanks for the quick reply. I have incorporated changes in fvSolution as you suggested but still my solution is different from analytical solution. Yes I am using similar boundary conditions as given in the problem. Following are my boundary conditions: 0/D dimensions [0 1 0 0 0 0 0]; internalField uniform (0 0 0); boundaryField { topSurface { type tractionDisplacement; traction uniform (0 0 0); pressure uniform 0; value uniform (0 0 0); } bottomSurface { type tractionDisplacement; traction uniform (0 0 0); pressure uniform 0; value uniform (0 0 0); } fixedEnd1 { type fixedValue; value uniform (0 0 0); } fixedEnd2 { type fixedValue; value uniform (0 0 0); } defaultFaces { type empty; } } 0/T dimensions [0 0 0 1 0 0 0]; internalField uniform 0; boundaryField { topSurface { type fixedValue; value uniform -100; } bottomSurface { type fixedValue; value uniform 100; } fixedEnd1 { type zeroGradient; } fixedEnd2 { type zeroGradient; } frontAndBack { type empty; } } I am also attaching system and log files of my solution. Do you think that something is wrong in boundary conditions and/or system files. Is this okay to use solidDisplacementFoam solver for steady state because I have not changed equations in solidDisplacementFoam.C file (only changed steady state ddt schemes) ? Thanks, Sargam |

Quote:
Hi Philip, Sorry I am not able to attach log file, it is larger in size therefore I am sending you some last initial iterations from log file. Iteration: 49997 GAMG: Solving for T, Initial residual = 7.9969e-09, Final residual = 7.9969e-09, No Iterations 0 GAMG: Solving for Dx, Initial residual = 9.99821e-09, Final residual = 9.99821e-09, No Iterations 0 GAMG: Solving for Dy, Initial residual = 9.99863e-09, Final residual = 9.99863e-09, No Iterations 0 ExecutionTime = 517.38 s ClockTime = 522 s Iteration: 49998 GAMG: Solving for T, Initial residual = 7.9969e-09, Final residual = 7.9969e-09, No Iterations 0 GAMG: Solving for Dx, Initial residual = 9.99821e-09, Final residual = 9.99821e-09, No Iterations 0 GAMG: Solving for Dy, Initial residual = 9.99863e-09, Final residual = 9.99863e-09, No Iterations 0 ExecutionTime = 517.38 s ClockTime = 522 s Iteration: 49999 GAMG: Solving for T, Initial residual = 7.9969e-09, Final residual = 7.9969e-09, No Iterations 0 GAMG: Solving for Dx, Initial residual = 9.99821e-09, Final residual = 9.99821e-09, No Iterations 0 GAMG: Solving for Dy, Initial residual = 9.99863e-09, Final residual = 9.99863e-09, No Iterations 0 ExecutionTime = 517.39 s ClockTime = 522 s Iteration: 50000 GAMG: Solving for T, Initial residual = 7.9969e-09, Final residual = 7.9969e-09, No Iterations 0 GAMG: Solving for Dx, Initial residual = 9.99821e-09, Final residual = 9.99821e-09, No Iterations 0 GAMG: Solving for Dy, Initial residual = 9.99863e-09, Final residual = 9.99863e-09, No Iterations 0 Max sigmaEq = 4.4936e+08 ExecutionTime = 517.46 s ClockTime = 522 s End |

Hi Sargam,
OK from your log, your model is converged. By the way, you can see that the solver is doing zero inner iterations, this is because your linear solver tolerance needs to be tighter than your solution tolerance i.e.: Code:
` D` Yes, it is fine to use solidDisplacementFoam for steady-state, as setting d2dt2 scheme to steady state sets the inertia term to zero so the linear momentum equation becomes steady state. Also, your fvSchemes look fine. I have successfully used this solver to model a pipe with internal pressure and temperature and the results were in very close agreement with analytical predictions. Is your analytical solution for a 3-D bar or 2-D bar? You model is 2-D with front and back being the empty directions. Is it possible to post the analytical solution here or give a link to it? Often I have found that when something doesn't agree with the analytical solution, it may be due to boundary conditions being not exactly the same. Philip |

Quote:
Hi Philip, Thanks for the reply. I appreciate your valuable inputs. I have taken this problem from a book "Thermal Stresses" by Naotake et al. Please open following link and find this problem in capter-2, Thermal Stresses in Beams, page number 31, heading number 2.1.2. In this problem I have not considered curvature. http://books.google.ca/books?id=u3XG...stress&f=false I am using right boundary conditions or I need to change boundary conditions? Thanks, Sargam |

Sargam,
Hmmnn I am not sure what boundary conditions are assumed in the analytical solution, it is not clear. The solution says the beam is clamped at the left and right and then says that the beam will remain perfectly straight when the temperatures are applied, but when you apply a temperature to the top and bottom the beam will warp even if the left and right are clamped. Is there a reason why you are using this particular case? There are many analytical solutions for coupled thermal-stress problems, if you are just interested in verifying the solver. Best regards, Philip |

Quote:
Hi Philip, Thank you for the reply. Actually I am solving this problem just to verify the solver. Could you please suggest me some simple example problems/book/journal so that I can validate analytical results with simulation results? Thanks in advance. Sargam |

Sargam,
OK, I would recommend a thick walled cylinder with temperature T_i at the inner surface and T_o at the outer surface - described here in the Ansys benchmarks. The analytical solution can be found in Timoshenko. I can email you the relevant equations if you pm me your email address. Best regards, Philip |

Hi Philip, hi Sargam,
could one of you provide the Timoshenko-case? Thanks, Markus. |

Hi Markus,
Actually the hotCylinder test case is in the recently released solidMechanics solvers for OpenFOAM-1.6-ext (see here). There is also a utility which outputs the analytical solution. Best regards, Philip |

About zero flux boundary condition...Hi everyone,
I am fresher for openFoam. I have written my own application. I am doing my project on suspension (solid particles in fluid) flow through straight channels. I prepared my solver for the coupling of continuity, momentum and particle conservation equation. Now i am facing problem with boundary condition for the particle volume fraction at the upper and lower walls. When applied this condition in particle conservation equation i got an expression for the gradient of particle volume fraction. my governing equation for the particle volume fraction is:- solve( fvm::div(phi, T) + fvm::laplacian(0.62*1.82*pow(a,2)*g*pow(T,2)*pow(0 .68-T,-1), T) + fvm::laplacian(0.41*pow(a,2)*g*T, T) == - fvc::laplacian(0.41*pow(a,2)*T*T, g) ); where T=particle volume fraction (no units) where g=local strain rate scalar=1.41421*sqrt(magSqr(symm(fvc::grad(U))))After applying zero boundary condition i got an expression for gradient as:- grad(T)= - 0.41*pow(T, 2)*(fvc::grad(g))/(T*g*(0.41+T*1.1284*pow(0.68-T, -1)))For this purpose i need to develop derived boundary condition. I checked the boundary conditions and found that solidDisplacementFoam/tractionDisplacement matches for my needs. I developed code based upon that solver but i am getting some error message. That's why i reproduced the same tractionDisplacement changing name to mytractionDisplacement. when i compiled with wmake the following error is coming (which is same as those i obtained for the above gradient expression)Error message:-malli_reddy@ubuntu:~/Desktop/mysolidDisplacementFoam/mytractionDisplacement$ wmake Making dependency list for source file mytractionDisplacementFvPatchVectorField.CPlease guide me to rectify this error. Now i am using OF 2.1.1 version. And give any valuable information about SOURCE=mytractionDisplacementFvPatchVectorField.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam211/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam211/src/OpenFOAM/lnInclude -I/opt/openfoam211/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/mytractionDisplacementFvPatchVectorField.o g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam211/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam211/src/OpenFOAM/lnInclude -I/opt/openfoam211/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linuxGccDPOpt/mytractionDisplacementFvPatchVectorField.o -L/opt/openfoam211/platforms/linuxGccDPOpt/lib \ -lfiniteVolume -lOpenFOAM -ldl -lm -o /home/malli_reddy/OpenFOAM/malli_reddy-2.1.1/platforms/linuxGccDPOpt /bin/mytractionDisplacementFvPatchVectorField /usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/../../../crt1.o: In function `_start':(.text+0x18): undefined reference to `main' collect2: ld returned 1 exit status make: *** [/home/malli_reddy/OpenFOAM/ malli_reddy-2.1.1/platforms/linuxGccDPOpt/bin/mytractionDisplacementFvPatchVectorField] Error 1swak4Foam utility.Thanks Regards Mallikarjuna |

Quote:
Best regards, Philip |

Hi Philip,
very much thanks for quick reply. I have one problem related this posts. When i run my case by using my solver the following error message is coming. I am not getting what it is trying to say, Error message:-malli_reddy@ubuntu:~/OpenFOAM/malli_reddy-2.1.1/PROJECT/validation$ myDiffusivecFoam /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 2.1.1-221db2718bbb Exec : myDiffusivecFoam Date : Sep 12 2012 Time : 22:39:06 Host : "ubuntu" PID : 2089 Case : /home/malli_reddy/OpenFOAM/malli_reddy-2.1.1/PROJECT/validation nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Disallowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Reading transportProperties Reading field p Reading field U Reading field T Reading/calculating face flux field phi No field sources present SIMPLE: convergence criteria field p tolerance 1e-05 field U tolerance 1e-05 field T tolerance 1e-05 Starting time loop Time = 1nl [0 0 -1 0 0 0 0] 0.005626 DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 4.7087e-06, No Iterations 5 DILUPBiCG: Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0 #0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #2 Uninterpreted: #3 Foam::DILUPreconditioner::calcReciprocalD(Foam::Fi eld<double>&, Foam::lduMatrix const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #4 Foam::DILUPreconditioner::DILUPreconditioner(Foam: :lduMatrix::solver const&, Foam::dictionary const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #5 Foam::lduMatrix::preconditioner::addasymMatrixCons tructorToTable<Foam::DILUPreconditioner>::New(Foam ::lduMatrix::solver const&, Foam::dictionary const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #6 Foam::lduMatrix::preconditioner::New(Foam::lduMatr ix::solver const&, Foam::dictionary const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #7 Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #8 Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libfiniteVolume.so" #9 Foam::fvMatrix<double>::solve() in "/home/malli_reddy/OpenFOAM/malli_reddy-2.1.1/platforms/linuxGccDPOpt/bin/myDiffusivecFoam" #10 in "/home/malli_reddy/OpenFOAM/malli_reddy-2.1.1/platforms/linuxGccDPOpt/bin/myDiffusivecFoam" #11 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6" #12 in "/home/malli_reddy/OpenFOAM/malli_reddy-2.1.1/platforms/linuxGccDPOpt/bin/myDiffusivecFoam" Floating point exception please let me know what is the error. Thanks Regards Mallikarjuna |

Quote:
Thanks a lot. I will check it. Markus |

All times are GMT -4. The time now is 15:45. |