|
[Sponsors] |
January 9, 2019, 08:26 |
Individual element of a symmetric matrix
|
#1 | |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
Hello,
I would like to know how to extract the xy element from the strain rate tensor: Quote:
|
||
January 9, 2019, 14:31 |
|
#2 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
I wrote this snippet of code:
Code:
Dxy_ ( IOobject ( IOobject::groupName("Dxy", U.group()), runTime_.timeName(), mesh_, IOobject::NO_READ, IOobject::AUTO_WRITE ), //symm(fvc::grad(U))().component(symmTensor::XY) U.mesh(), dimensionSet(0, 0, -1, 0, 0, 0, 0) ), volSymmTensorField D = symm(gU); forAll(D, i) { Dxy_[i] = D[i].xy(); } Unfortunately, however, the gradient of xy on the wall is giving zero and this causes the solver to give a floating-point error. log: LINK Could someone help me with how to solve this problem? |
|
January 10, 2019, 12:51 |
|
#3 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
Anyone can help?
|
|
January 11, 2019, 07:32 |
|
#4 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Hi!
Add a little number (for example SMALL) to it so you can avoid the division with zero. |
|
January 11, 2019, 08:04 |
|
#5 |
Senior Member
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10 |
But the problem is not this ... if I use another method, it extracts values on the wall, that is, it is missing a piece in the code that guarantees the calculation of the value of the gradient on the wall.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Gmsh] 3D Mesh conversion from gmsh-2.5.0 to OpenFOAM | Ancioi | OpenFOAM Meshing & Mesh Conversion | 17 | January 9, 2019 00:50 |
Identifying Markers in a CGNS Mesh | tjim | SU2 | 3 | October 12, 2018 02:21 |
[Other] Mesh Importing Problem | cuteapathy | ANSYS Meshing & Geometry | 2 | June 24, 2017 06:29 |
autoPatch error, mesh quality related...? | Alexvader | OpenFOAM | 0 | October 6, 2011 18:57 |
OpenFOAM version 1.6 details | lakeat | OpenFOAM Running, Solving & CFD | 42 | August 26, 2009 22:47 |