|
[Sponsors] |
May 19, 2009, 14:43 |
Problem in the calculation of function
|
#1 |
Senior Member
|
Hi all,
I have a problem where I have to calculate the value of a scalar function func, in the form func=1+A*tr(tensor1) where A is a scalar constant, tensor is a volume tensorial field, and func is scalar field. In the createFields.h file I included the following line volScalarField trac_tensor ( IOobject ( "trac_tensor", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ), tr(tensor) ); volScalarField func ( IOobject ( "func", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ), 1.0 + A*trac_tensor ); I have considered that the trace of tensor generates a scalar field. Although it compiles fine and the code runs, when I check the values given by func_lin, I noted that it is always returning one. The value of A is defined and the components of the tensor change, but, func_lin never changes. Am i doing something wrong? How I should do the calculation of func? Antonio Martins |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
problem in drag force calculation | M.Hasib | FLUENT | 1 | March 16, 2009 12:01 |
Wall function calculation of tau_wall | KRK | FLUENT | 0 | October 30, 2007 13:50 |
REAL GAS UDF | brian | FLUENT | 6 | September 11, 2006 08:23 |
Warning 097- | AB | Siemens | 6 | November 15, 2004 04:41 |
Stream function in axisymmetrical problem | Daniel | Siemens | 0 | September 8, 2003 11:20 |