Creating a symmTensorField from a scalarField
Greetings,
I'm implementing a boundary condition for a symmTensor variable. I calculate a scalarField, and then want to apply it to the diagonal components of the symmTensorField. The fields are turbulent intensity and reynolds stress, though that really isn't important. The relevant (updateCoeffs) part of the code is as follows... Code:
Many thanks, and apologies for reposting this. No-one replied to the last post I made, and I've had some time to re-formulate the question, hopefully a little more clearly. |
Did you already try something like this:
Code:
symmTensorField stress(value,0,0,value,0,value); Code:
symmTensor I(1,0,0,1,0,1); |
The second of those works. Thank you very much.
|
questions
Quote:
Hi Bill, I'm implementing a boundary condition for a symmTensor variable now, but I do not know how to start. Could you share your solver or case? Thanks in advance. Meihua |
This post is 7 years old. I don't have the files any more.
If you want to write a boundary condition for a symmetric tensor, you can run the following to get you started... Code:
foamNewBC -f -symmTensor myBoundaryCondition |
Quote:
Thank you, Bill. |
Quote:
Another question about tensor boundary condition. If I set a tensor on the boundary, how can it exist? I mean it seems that a tensor cannot exist on a surface, but in OpenFoam, the boundaries are surfaces. Maybe my understanding is wrong. Thanks in advance! |
The geometry that the field is associated with does not impose any limit on the data type. The field in question is just a list of symmTensors, one per patch face. How they relate to the patch geometry (face normals, areas, etc...) depends on your implementation.
|
version of openfoam?
This command seems not to be in OF-2.3.x.
Is it new ? Quote:
|
Quote:
|
Quote:
|
Not for now. I'm actually working on simple non-newtonian turbulent mixing.
I was targeting the FENE model where there are symmTensor tau. But I dropped that... Programming in OpenFOAM is not evident. At the time I was interested in creating a moving BC for FENE for specific type "symmTensor". |
Tensorial BC
Tensorial BC exists.
Take a look at http://https://github.com/fppimenta/rheoTool/blob/master/of40/tutorials/rheoFoam/Cavity/Oldroyd-BLog/0/tau Where tau (That I mentioned in previous post) is a symmTensor. |
Hi Everyone,
Is it possible to use codedFixedValue boundary condition to define boundary value of a symmTensor field ? I am working on rheoTool and I need to set Poiseuille stress profile at the inlet. Code:
inlet Code:
Using dynamicCode for codedFixedValue poisStress at line 24 in "/home/pavi/OpenFOAM/pavi-9/run/De03/0/tau/boundaryField/inlet" Thank You. |
All times are GMT -4. The time now is 10:40. |