CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   how symmetry bc is applied for a tensor ? (http://www.cfd-online.com/Forums/openfoam-programming-development/96123-how-symmetry-bc-applied-tensor.html)

 dshawul January 12, 2012 22:55

how symmetry bc is applied for a tensor ?

Hello,
I want to understand how the symmetry boundary condition is applied for a tensors of rank 1 and above in OF.
Say at a wall with normal n and a velocity vector V at adjacent cell, I think it would be like
Code:

```  Vsymm =  V - dot(V,n);   Vsymm = mag(Vsymm) / mag(V)  * V;```
How do you transform a 2 rank and above tensor (f.i 3x3 stress tensor ) at a symmetric wall boundary in a similar way?

thanks

 dshawul January 19, 2012 17:15

Ok I found how it is applied in OF
Code:

```tmp<vectorField> nHat = this->patch().nf();     Field<Type>::operator=     (         (             this->patchInternalField()           + transform(I - 2.0*sqr(nHat), this->patchInternalField())         )/2.0     );     transformFvPatchField<Type>::evaluate();```
This averages the reflection of the tensor and itself to get a vector parallel to the wall.
But then it doesn't adjust its magnitude to equal the original vector, like I tried to do in my post above. Is this correct ?

 All times are GMT -4. The time now is 12:16.