CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   tractionDisplacement BC for solidDisplacementFoam with Body Forces (http://www.cfd-online.com/Forums/openfoam-programming-development/99865-tractiondisplacement-bc-soliddisplacementfoam-body-forces.html)

 Hisham April 13, 2012 21:39

tractionDisplacement BC for solidDisplacementFoam with Body Forces

Hi Foamers,

I need to add body forces to the solidDisplacementFoam solver. So it goes something similar to:
Code:

```fvVectorMatrix DEqn                 (                     fvm::d2dt2(D)                 ==                     fvm::laplacian(2*mu + lambda, D, "laplacian(DD,D)")                   + bodyForces                    + divSigmaExp                 );```
Where the bodyForces vectorField represents accelerations (e.g. gravity). Nevertheless, I have not found a reference on how to add a term to gradient() in tractionDisplacement boundary condition. I mean that for example a term for strain resulting from thermal stresses is added to the gradient() in tractionDisplacementFvPatchVectorField.C like:
Code:

```gradient() =     (         (traction_ + pressure_*n)/rho       + twoMuLambda*fvPatchField<vector>::snGrad() - (n & sigmaD)     )/twoMuLambda;  if (thermalStress)     {         ...         gradient() += n*threeKalpha*T/twoMuLambda;     }```
I really appreciate any ideas or directions to references (or even how to do it :D)

Best regards,
Hisham El Safti

 bigphil April 14, 2012 02:40

Quote:
 Originally Posted by Hisham (Post 354647) Hi Foamers, I need to add body forces to the solidDisplacementFoam solver. So it goes something similar to: Code: ```fvVectorMatrix DEqn                 (                     fvm::d2dt2(D)                 ==                     fvm::laplacian(2*mu + lambda, D, "laplacian(DD,D)")                   + bodyForces                    + divSigmaExp                 );``` Where the bodyForces vectorField represents accelerations (e.g. gravity). Nevertheless, I have not found a reference on how to add a term to gradient() in tractionDisplacement boundary condition. I mean that for example a term for strain resulting from thermal stresses is added to the gradient() in tractionDisplacementFvPatchVectorField.C like: Code: ```gradient() =     (         (traction_ + pressure_*n)/rho       + twoMuLambda*fvPatchField::snGrad() - (n & sigmaD)     )/twoMuLambda;  if (thermalStress)     {         ...         gradient() += n*threeKalpha*T/twoMuLambda;     }``` I really appreciate any ideas or directions to references (or even how to do it :D) Best regards, Hisham El Safti
Hi Hisham,

Body forces act on the volume of each cell and are source terms so they do not have boundary conditions.

So to add a body force term, just add 'rho*g' to the momentum equation, where g is a dimensionedVector -9.81 in the y direction.

Philip

 Hisham April 14, 2012 06:24

Hi Philip

Quote:
 Originally Posted by bigphil (Post 354661) Body forces act on the volume of each cell and are source terms so they do not have boundary conditions. So to add a body force term, just add 'rho*g' to the momentum equation, where g is a dimensionedVector -9.81 in the y direction. Philip
I agree with you that body forces do not need a BC for themselves but don't they contribute to displacement gradient at the boundary? I know that the boundary values can be retrieved from cells next to it.

I also have some other explicit terms that come from another variable (pore fluid velocity). They are all explicit terms (as the case of the "T" term in the DEqn in solidDisplacementFoam.C)
Code:

``` if (thermalStress)                 {                     const volScalarField& T = Tptr();                     DEqn += fvc::grad(threeKalpha*T);                 }```
So is the existence of a "T"-term added to the gradient() [at D's tractionDisplacement BC] due to the existence of a "T" BC or because "T" contributes to the displacement gradient?

Best regards,
Hisham

 bigphil April 14, 2012 06:49

Hi Hisham,

The reason there is a T-term in the boundary condition is because T appears in the constitutive equation i.e. Hooke's law for a thermal elastic solid is:
sigma =2*mu*e +lambda*I*tr(e) - (2*mu + 3*lambda)*alpha*(T - Tref)*I

Therefore the traction on a boundary face is Trac = n . sigma, and then you sub in Hooke's law and rearrange this equation to get the equivalent (implicit) gradient on the boundary, which is what you set in the traction BC. So the traction BC will contain a T-term. But it will not contain any body force contributions.

If you add rho*g to the momentum equation then it will work, I ran a quick test case and everything is fine on the traction boundaries.

Philip

 Hisham April 14, 2012 07:03

Hi Philip

Thanks a lot for your help! Now it is clear to me :)

Best regards
Hisham

 SamerAli April 29, 2013 13:26

Hi Philip

using the same methodology, if simulation fluid-structure interaction problem, and i want to transfer the temperature computed at the wall of a solid, as boundary condition for the fluid part (where there is a common patch between fluid and solid) ??

Best regards

 bigphil April 30, 2013 16:27

Quote:
 Originally Posted by SamerAli (Post 423968) Hi Philip using the same methodology, if simulation fluid-structure interaction problem, and i want to transfer the temperature computed at the wall of a solid, as boundary condition for the fluid part (where there is a common patch between fluid and solid) ?? Best regards
Hi Samer,

yes you can follow the same Dirichlet-Neumann coupling procedure to couple the temperature between the regions.

Philip

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