|
[Sponsors] |
April 10, 2014, 00:49 |
dimension [0 0 -0 0 0 0 0]?
|
#1 |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 849
Rep Power: 18 |
Hi guys,
I have a volScalarField, Code:
volScalarField epsilonD(pow(epsilon/pow(d,2),1/3)); But openfoam tell me its dimention is [0 0 -0 0 0 0 0]? Any ideas? |
|
April 10, 2014, 00:56 |
|
#2 |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 849
Rep Power: 18 |
volScalarField epsilonD(pow(epsilonF,1/3));
This is very simple, epsilonF's dimension is [0 0 -3 0 0 0 0] , but epsilonD's dimention is [0 0 -0 0 0 0 0] |
|
April 10, 2014, 04:16 |
|
#3 |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 849
Rep Power: 18 |
Solved.
Code:
volScalarField epsilonD(pow(epsilonF,1.0/3.0)); Code:
Foam::dimensionSet Foam::cbrt(const dimensionSet& ds) { return pow(ds, 1.0/3.0); } .......................... Foam::dimensionSet Foam::pow(const dimensionSet& ds, const scalar p) { dimensionSet dimPow ( ds[dimensionSet::MASS]*p, ds[dimensionSet::LENGTH]*p, ds[dimensionSet::TIME]*p, ds[dimensionSet::TEMPERATURE]*p, ds[dimensionSet::MOLES]*p, ds[dimensionSet::CURRENT]*p, ds[dimensionSet::LUMINOUS_INTENSITY]*p ); return dimPow; } |
|
April 10, 2014, 04:38 |
|
#4 |
Member
xuhe-openfoam
Join Date: Aug 2013
Location: DaLian,china
Posts: 82
Rep Power: 13 |
int a=1;
int b=3; float c=a/b; when a and b both are int, c=0 best wishes! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to get a single value from a volScalarField including the dimension | safre | OpenFOAM Programming & Development | 18 | May 20, 2016 09:01 |
Dimension of pressure: M/LT2 or L2/T2? | gcengineer | OpenFOAM Running, Solving & CFD | 6 | August 7, 2013 17:41 |
ANSYS Fluent 14.0, dimension problem? | SteveFinnan | ANSYS | 2 | June 14, 2013 10:12 |
the problem about dimension | bojiezhang | OpenFOAM | 2 | October 16, 2011 01:22 |
Dimension problem | faroque | OpenFOAM Running, Solving & CFD | 5 | February 19, 2008 09:56 |