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

How can I solve non-dimensional equations in FOAM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 28, 2013, 05:17
Default How can I solve non-dimensional equations in FOAM
  #1
New Member
 
Sean McGinty
Join Date: Sep 2013
Posts: 4
Rep Power: 13
mcgintygs is on a distinguished road
I'm interested in solving (as a starting point) a non-dimensionalised version of laplacianFoam.

After I have chosen my non-dimensionalisation, how can I implement this in Foam?

I'm worried that foam checks dimensions!

For example:
How do I change the timestep and spatial coordinates (in blockMeshDict) to be non-dimensional, and how do I deal with diffusion coefficients (which will become ratios of diffusion coefficients after the non-dimensionalisation)

Is it possible to do this. Does anyone know how?

Any help would be much appreciated.
mcgintygs is offline   Reply With Quote

Old   October 28, 2013, 16:02
Default
  #2
Member
 
Jack
Join Date: Dec 2011
Posts: 94
Rep Power: 14
ripperjack is on a distinguished road
Quote:
Originally Posted by mcgintygs View Post
I'm interested in solving (as a starting point) a non-dimensionalised version of laplacianFoam.

After I have chosen my non-dimensionalisation, how can I implement this in Foam?

I'm worried that foam checks dimensions!

For example:
How do I change the timestep and spatial coordinates (in blockMeshDict) to be non-dimensional, and how do I deal with diffusion coefficients (which will become ratios of diffusion coefficients after the non-dimensionalisation)

Is it possible to do this. Does anyone know how?

Any help would be much appreciated.
You need to do some modification on the solver, e.g., change nu to 1/Re, change kappa to Pr, etc. The equations have very similar form the only different is the coefficient, so it can be done without large modification.

Do not change the unit of variables!

Regards,
ripperjack is offline   Reply With Quote

Old   October 28, 2013, 17:08
Default
  #3
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 22
Lieven will become famous soon enough
Quote:
How do I change the timestep and spatial coordinates (in blockMeshDict) to be non-dimensional
As far as I know you can't. In blockMesh you could use the convertToMeters parameter if you want to enter the coordinates with the dimensionless values, but the dimensions will always be kept as meters.

Second, you could change all the equations you want to solve ... but alternatively you could also simply solve the existing equations and rescale your solution when writing the solution. That works best for me (for one reason, you'll always be stuck with the time derivative and nabla operator which keep their dimensions).

Cheers,

Lieven
Lieven is offline   Reply With Quote

Old   March 20, 2014, 07:29
Default
  #4
Member
 
Tony
Join Date: Nov 2013
Posts: 35
Rep Power: 12
wzx1989221 is on a distinguished road
Hi Lieven,

I just wonder how did you rescale your solution? Can you give me a hint please?
Thank you very much.

Kind regards,
Tony
wzx1989221 is offline   Reply With Quote

Old   March 22, 2014, 08:23
Default
  #5
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 22
Lieven will become famous soon enough
Hi Tony,

Have a look at http://en.wikipedia.org/wiki/Dimensional_analysis
Basically, you rescale your solution by multiplying it with reference quantities. For example, a concentration in [kg/m³] can be rescaled as:
Code:
c+ [-] = c [kg/m³]* L² [m²]*V[m/s] / R [kg/s]
where L is a reference length (e.g. stack height, when it concerns the release of a pollutant from a stack), V is a reference velocity (e.g. velocity at the tip of a stack) and R is the release rate.

This is merely an example but I hope you got the picture.

Cheers,

L
Lieven is offline   Reply With Quote

Old   March 22, 2014, 08:35
Default
  #6
Member
 
Tony
Join Date: Nov 2013
Posts: 35
Rep Power: 12
wzx1989221 is on a distinguished road
Hi Lieven,

It is really nice of you to give me the explanation. My case is I want to rescale my result to nondimensional value and continue the simulation, I wonder how you achieve it in OpenFOAM? I have done nondimensionalisation for U, p fields and geometry size, however, the simulation didn't run continuously. The simulation should continue without gap, right?

Kind regards,
Tony
wzx1989221 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
USER_FORTRAN solve iteratively a linear equations system fipellac CFX 9 June 12, 2019 08:03
[CGNS] CGNS converters available mbeaudoin OpenFOAM Meshing & Mesh Conversion 137 December 14, 2018 05:20
[snappyHexMesh] How to define to right point for locationInMesh Mirage12 OpenFOAM Meshing & Mesh Conversion 7 March 13, 2016 15:07
ansys to foam and solve with dsmc dark lancer OpenFOAM Pre-Processing 0 October 21, 2012 17:07
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51


All times are GMT -4. The time now is 04:50.