CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

Problems with dimension

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 28, 2013, 03:34
Default Problems with dimension
  #1
Member
 
Join Date: Aug 2011
Posts: 74
Rep Power: 5
idefix is on a distinguished road
Hello,

hopefully Ive got an easy question for you

I just want to calculate a absolut value of a gradient of a volScalarField (for example epsilon of the k-epsilon-turbulence model)

Could somebody help me with the name of the function?

Thanks a lot

Last edited by idefix; April 29, 2013 at 03:18.
idefix is offline   Reply With Quote

Old   April 29, 2013, 04:06
Default
  #2
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
Code:
mag(fvc::grad(epsilon))
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Old   April 29, 2013, 04:33
Default
  #3
Member
 
Join Date: Aug 2011
Posts: 74
Rep Power: 5
idefix is on a distinguished road
Thanks

but now I get an error because of the dimensions.
(--> FOAM FATAL ERROR:
LHS and RHS of - have different dimensions
dimensions : [0 -1 0 0 0 0 0] - [0 0 0 0 0 0 0] )


I want to calculate
( mag(fvc::grad(alpha1_)) - 1 ) / ( mag(fvc::grad(alpha1_)) - 1.1 )

alpha1_ is the phase volume fraction of the VOF-model

Has somebody an idea how I can do it?
I thought that this term has no dimension:
(metre - 1) / (metre -1 ) = 1

thanks again
idefix is offline   Reply With Quote

Old   April 29, 2013, 06:06
Default
  #4
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
its some how obvious :P, grad means in simple word d/dx , when you gradient a dimless value! it gets a dimension -1 for meter so you can not add it with a constant number unless you use its value with value() function or give you constant a dimension
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
the problem about dimension bojiezhang OpenFOAM 2 October 16, 2011 00:22
[ICEM] Problems with coedge curves and surfaces tommymoose ANSYS Meshing & Geometry 0 August 5, 2011 16:02
Needed Benchmark Problems for FSI Mechstud Main CFD Forum 4 July 26, 2011 12:13
Two-phase air water flow problems by activating Wall Lubrication Force challenger85 CFX 5 November 5, 2009 06:44
Help required to solve Hydraulic related problems aero CFX 0 October 30, 2006 12:00


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