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

fields + dimensions

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

Reply
 
LinkBack Thread Tools 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: 418
Rep Power: 15
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.
Post-doctoral Fellow
Research Center for Computational Mechanics (CIMEC) - CONICET/FICH-UNL
T.E.: 54-342-4511594 Ext. 1005
Güemes 3450 - (3000) Santa Fe
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 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
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: 418
Rep Power: 15
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.
Post-doctoral Fellow
Research Center for Computational Mechanics (CIMEC) - CONICET/FICH-UNL
T.E.: 54-342-4511594 Ext. 1005
Güemes 3450 - (3000) Santa Fe
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: 91
Rep Power: 8
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

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


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