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

fields + dimensions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 28, 2011, 22:29
Default fields + dimensions
  #1
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24
santiagomarquezd will become famous soon enough
Hi all, I'm working in a solver and facing some problems at the time of deciding in how to implement the continuum formulation. Until I've read all important field in solver like, U, p, alpha, etc. are read from disk with dimensions and are used this way. Constants read from dictionaries have dimensions too.
My problems arise when I have to do some temporal calculus because I want to keep the dimensions in scalar and vectorFields. I'm using vol*Field to do so, but this kind of object have boundaries, which often are not necessary, because I'm doing calculus only with the internalField. When I use this fields as denominators the problem is that generates an error because the zero values of boundaries.

1. Is there a way to circumvent this issue?
2. Is normal to use vol*Fields to do this temporal calculus or is better to use non-dimensional objects or another kind of class?

Thanks in advance.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Old   March 1, 2011, 07:52
Default
  #2
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
ur question is not clear at least for me
however for example if alpha is vol scalar field then
scalarField alphaInternal= alpha.internalField();
nimasam is offline   Reply With Quote

Old   March 1, 2011, 12:57
Default
  #3
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24
santiagomarquezd will become famous soon enough
Yes this is an option, but it does not preserve the units, so you have to do all calculations without units.

Regards.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Old   March 7, 2011, 13:47
Default
  #4
Member
 
Ivor Clifford
Join Date: Mar 2009
Location: Switzerland
Posts: 94
Rep Power: 17
cliffoi is on a distinguished road
You can use DimensionedFields to preserve the dimension checking, i.e.

DimensionedField<scalar, fvMesh>& alphai = alpha;
cliffoi 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
Dimensions ! T.D. OpenFOAM Running, Solving & CFD 4 September 24, 2010 15:26
Missing fields in reconstructPar flowris OpenFOAM 1 July 9, 2010 03:48
temperature / enthalpy fields depending on type of fvPatchField astein OpenFOAM Programming & Development 0 June 28, 2010 08:10
domainIntegrate, dieselFoam and Lagrangian Fields mturcios777 OpenFOAM 0 May 14, 2010 16:16
PostChannel maka OpenFOAM Post-Processing 5 July 22, 2009 10:15


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