|
[Sponsors] |
Dimensioned Tensor: having diagonal terms which are not predefined constant |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 23, 2015, 13:39 |
Dimensioned Tensor: having diagonal terms which are not predefined constant
|
#1 |
Member
Paolo Capobianchi
Join Date: Sep 2014
Posts: 35
Rep Power: 12 |
Hello everyone,
I would like to ask if someone can tell me if it is possible to define a dimensionedSymmtensor having diagonal terms which are not predefined constant (variables, let say). In practice I would like to know if it is possible to define an "object " like this: Code:
D_ ( dimensionedSymmTensor ( "D", dimensionSet(0, 0, 0, 0, 0, 0, 0), symmTensor ( D_.xx , 0, 0, D_.yy, 0, D_.zz ) ) ), Thank you very much in advance. Regards, Paolo |
|
July 25, 2015, 13:11 |
|
#2 |
Member
Paolo Capobianchi
Join Date: Sep 2014
Posts: 35
Rep Power: 12 |
Hello,
I have just found another way to define the volumeTensorField Code:
{ return tmp<Foam::volTensorField> ( new volTensorField ( IOobject ( "D", localtimeName, *localmesh, IOobject::NO_READ, IOobject::NO_WRITE ), *localmesh ) ); } Furthermore, I have another tensor field A, and my goal is to obtain D as the diagonal of the field A. Does anyone knows if there is a way around to get the diagonal of a tensor field? Thanks Paolo |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
why divergence occures in these cases | immortality | OpenFOAM Running, Solving & CFD | 2 | January 25, 2013 11:21 |
How to install CGNS under windows xp? | lzgwhy | Main CFD Forum | 1 | January 11, 2011 19:44 |
CGNS lib and Fortran compiler | manaliac | Main CFD Forum | 2 | November 29, 2010 07:25 |
Really big problems when creating own materials da | Jop | FLUENT | 0 | June 28, 2007 12:15 |
constant and exotic source terms in NS eq | Mika | FLUENT | 2 | September 6, 2001 09:55 |