# dimension [0 0 -0 0 0 0 0]?

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 LinkBack Thread Tools Display Modes
 April 9, 2014, 23:49 dimension [0 0 -0 0 0 0 0]? #1 Senior Member   Dongyue Li Join Date: Jun 2012 Location: Torino, Italy Posts: 667 Rep Power: 8 Hi guys, I have a volScalarField, Code: `volScalarField epsilonD(pow(epsilon/pow(d,2),1/3));` you can see that epsilon's dimension is [0 2 -3 0 0 0 0] and d's dimension is [0 1 0 0 0 0 0], So epsilonD's dimension should be [0 0 -1 0 0 0 0] But openfoam tell me its dimention is [0 0 -0 0 0 0 0]? Any ideas?

 April 9, 2014, 23:56 #2 Senior Member   Dongyue Li Join Date: Jun 2012 Location: Torino, Italy Posts: 667 Rep Power: 8 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, 03:16 #3 Senior Member   Dongyue Li Join Date: Jun 2012 Location: Torino, Italy Posts: 667 Rep Power: 8 Solved. Code: `volScalarField epsilonD(pow(epsilonF,1.0/3.0));` I checked it out in dimensionSet.C and I got this piece of code: 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; }``` I dont know if its a bug. But its solved right now. Any comments are welcomed.

 April 10, 2014, 03:38 #4 Member   xuhe-openfoam Join Date: Aug 2013 Location: DaLian，china Posts: 82 Rep Power: 3 int a=1; int b=3; float c=a/b; when a and b both are int, c=0 best wishes!

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post gcengineer OpenFOAM Running, Solving & CFD 6 August 7, 2013 16:41 SteveFinnan ANSYS 2 June 14, 2013 09:12 safre OpenFOAM 10 March 25, 2013 05:33 bojiezhang OpenFOAM 2 October 16, 2011 00:22 faroque OpenFOAM Running, Solving & CFD 5 February 19, 2008 09:56

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

 Contact Us - CFD Online - Top