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

Dimension checking for internalField() / Field()

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   August 29, 2011, 23:28
Default Dimension checking for internalField() / Field()
  #1
New Member
 
Join Date: Jun 2011
Posts: 22
Rep Power: 14
timbojones is on a distinguished road
Hello,

I'm still pretty new to OpenFOAM, but have been developing a couple of solvers of late. In my most recent work, I have an internal mass source that's introduced into an arbitrary number of cells based on a flag. As part of this operation, I need to calculate the total volume over which the mass source is added and then weight the mass source in each cell by the cell volume divided by the total volume over which the mass source acts.

In implementing this scheme, I've used the .internalField() along with mesh.V() to build up the weighted mass source. It all seems to be going OK. However, I do have a couple of questions based on what I have right now.

1) Are individual elements of a volScalarField accessed within a forAll loop treated as dimensionless? For example, I need to define totalVol as a scalar to make the assignment totalVol += mesh.V()]celli] within a forAll loop (with celli as the iterator).

2. Perhaps along a similar line, are the dimensions of assignments made using .internalField() or .Field() checked? It seems that the dimensions of the result are whatever dimensions have been assigned to the LHS field.

Hopefully this is understandable to readers out there and someone can help me to understand things a bit better.

Thanks and Regards,
timbojones
timbojones is offline   Reply With Quote

 


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
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
critical error during installation of openfoam Fabio88 OpenFOAM Installation 21 June 2, 2010 03:01
Problems in compiling paraview in Suse 10.3 platform chiven OpenFOAM Installation 3 December 1, 2009 07:21
Help%7e%7einstall openfoam13 on fc5%7e%7e aderliner OpenFOAM Installation 2 September 11, 2006 07:24
Gerris software installation mer Main CFD Forum 2 November 12, 2005 08:50


All times are GMT -4. The time now is 15:44.