CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Dimensionless variables

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 2, 2009, 04:07
Default Dimensionless variables
  #1
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 250
Blog Entries: 1
Rep Power: 19
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
Hi everybody!

I wonder if it is possible to use dimensionless variables in OpenFOAM? I tried it on my own and it didn't work. For example, using icoFoam, we can transform continuity and momentum equations to form:

div U = 0
D U/ Dt = 1/Re laplacian(U) - grad p

and icoFoam produces fatal error and exits:
Quote:
incompatible dimensions for operation
[U[0 0 -1 0 0 0 0] ] + [U[0 -1 0 0 0 0 0] ]#0 Foam::error:rintStack(Foam::Ostream&) in "/home/forsher/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/forsher/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 void Foam::checkMethod<Foam::Vector<double> >(Foam::fvMatrix<Foam::Vector<double> > const&, Foam::fvMatrix<Foam::Vector<double> > const&, char const*) in "/home/forsher/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/icoFoam"
#3 Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > > Foam:perator+<Foam::Vector<double> >(Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > > const&, Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > > const&) in "/home/forsher/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/icoFoam"
#4 main in "/home/forsher/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/icoFoam"
#5 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#6 Foam::regIOobject::readIfModified() in "/home/forsher/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/icoFoam"


From function checkMethod(const fvMatrix<Type>&, const fvMatrix<Type>&)
in file /home/dm2/henry/OpenFOAM/OpenFOAM-1.5/src/finiteVolume/lnInclude/fvMatrix.C at line 1184.

FOAM aborting

Aborted
I rescaled all my variables and size of calculation domain using characteristic length L0 and velocity U0. Then I set all dimensions to 0. I am pretty sure, that problem arise because I cannot set dimensions for mesh and cells. Am I right?

So the only solution seems to to be using same dimensions, but rescaling values. But it is not correct from formulation side... Is there any other solution?

Waiting for your response! Have a good day!
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

http://smmp.unileoben.ac.at
makaveli_lcf is offline   Reply With Quote

Old   December 2, 2009, 04:22
Default
  #2
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 250
Blog Entries: 1
Rep Power: 19
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
Already found some answers on forum at
http://www.cfd-online.com/Forums/ope...-mesh-etc.html

and at
http://openfoamwiki.net/index.php/Ma...al_checking.3F

Answering possible future questions why I'm using dimensionless calculations - first, it is better numerically to use dimensionless variables, and second, than its is possible to compare two different flows, two different process regimes and so on.
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

http://smmp.unileoben.ac.at
makaveli_lcf is offline   Reply With Quote

Old   December 2, 2009, 05:10
Default
  #3
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by makaveli_lcf View Post
Hi everybody!

I wonder if it is possible to use dimensionless variables in OpenFOAM? I tried it on my own and it didn't work. For example, using icoFoam, we can transform continuity and momentum equations to form:

div U = 0
D U/ Dt = 1/Re laplacian(U) - grad p

and icoFoam produces fatal error and exits:


I rescaled all my variables and size of calculation domain using characteristic length L0 and velocity U0. Then I set all dimensions to 0. I am pretty sure, that problem arise because I cannot set dimensions for mesh and cells. Am I right?

So the only solution seems to to be using same dimensions, but rescaling values. But it is not correct from formulation side... Is there any other solution?

Waiting for your response! Have a good day!
Two other possibilities: - switch off dimension-checking (somewhere in etc/controlDict. It is described elsewhere on the forum. I don't do it and I don't advertise it. There may be a possibility that you can turn it off in your program by fiddling around with the dimensionSet::debug-variable, but you're on your own there) - the "extra" dimensions are introduced by the differential-operators. So you can multiply each differential-operator with a dimensionedScalar with the value 1 and the "opposite" dimension Bernhard
gschaider is offline   Reply With Quote

Old   December 2, 2009, 05:21
Default
  #4
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 250
Blog Entries: 1
Rep Power: 19
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
Thank you, Bernhard!
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

http://smmp.unileoben.ac.at
makaveli_lcf is offline   Reply With Quote

Old   May 27, 2013, 12:25
Default
  #5
New Member
 
OFghost
Join Date: Feb 2013
Location: Canada
Posts: 8
Rep Power: 13
umar82088 is on a distinguished road
Hi,
can you please explain the dimensions of each term in icoFoam,

fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
- fvm::laplacian(nu, U)
);

solve(UEqn == -fvc::grad(p));

Actually, I am trying to solve NS by non-dimensionalizing, i edited code like this
fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
- fvm::laplacian(1/Re, U)
);

solve(UEqn == -fvc::grad(p));

There comes an error in laplacianSchemes, so edited form is like this:

laplacianSchemes
{
default none;
laplacian((Re^-1),U) Gauss linear orthogonal;
laplacian((1|A(U)),p) Gauss linear orthogonal;
}

Can you please comment over my approach, along with dimensions of each term in solver file. I would really appreciate your help.
Many Thanks
Umar

Quote:
Originally Posted by gschaider View Post
Two other possibilities: - switch off dimension-checking (somewhere in etc/controlDict. It is described elsewhere on the forum. I don't do it and I don't advertise it. There may be a possibility that you can turn it off in your program by fiddling around with the dimensionSet::debug-variable, but you're on your own there) - the "extra" dimensions are introduced by the differential-operators. So you can multiply each differential-operator with a dimensionedScalar with the value 1 and the "opposite" dimension Bernhard
umar82088 is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dimensionless equations, variables, mesh etc bhh OpenFOAM Running, Solving & CFD 11 December 10, 2016 11:25
ADDITIONAL VARIABLES LIMITERS N.P CFX 5 December 1, 2011 07:47
Actual drag force from dimensionless equations slaxmi CFX 10 September 14, 2007 19:20
PHI file structure Eugene Phoenics 9 November 2, 2001 22:00
Saving variables on a user patch with physical coordinates Zoltan Turzo CFX 2 April 20, 2000 15:05


All times are GMT -4. The time now is 21:13.