CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   problems with dimensionedScalar (http://www.cfd-online.com/Forums/openfoam/70762-problems-dimensionedscalar.html)

DLC December 4, 2009 14:00

problems with dimensionedScalar
 
Hi Foamers....

I'm quite new to openFoam, and I'm having few basic problems while programming..
I'm working on interDyMFoam, OF1.5-dev and i'm doing a few changes in the mesh motion.

now I am trying to integrate the equations of motion of a floating body. Therfore need to multiply she body velocity by the deltaT (mesh_.time().deltaT, i suppose) of the PISO loop...

The problem is that mesh_.time().deltaT is a dimensionedScalar, body velocity is a scalar (double I think) and I must assign this product to a scalar (double). Obviously it's giving me ERROR.

How can I do it?

I really need some help....

thanks a lot!

Davide

l_r_mcglashan December 5, 2009 04:58

mesh_.time().deltaT().value() will give you the scalar value of time without the dimensions.

DLC December 6, 2009 12:14

Thanks a lot!...
seems to work now!
thanks again!

Davide


All times are GMT -4. The time now is 23:39.