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

field dimesions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 31, 2018, 12:50
Question field dimesions
  #1
New Member
 
Roberto
Join Date: Sep 2017
Posts: 1
Rep Power: 0
RobertoN is on a distinguished road
Dear All,

I need to obtain field dimensions from a field or from a dimensionedScalar.
Are there a method to obtaint the dimensions vector?
For example:

volScalarField field1(...);
dimesionedScalar var2(...);
...
vector dim1 = field1.dimensions();
vector dim2 = var2.dimensions();

I didn't find a way with google.
Thank you in advance.
RobertoN is offline   Reply With Quote

Old   August 31, 2018, 19:43
Default
  #2
Senior Member
 
Join Date: Aug 2015
Posts: 494
Rep Power: 15
clapointe is on a distinguished road
What do you need it for? A quick search of the code for something.dimesions() returns a lot of hits, so an easy way to check will be :

Code:
Info << "Dimensions : " << s.dimensions() << nl <<endl;
If you want to be able to use it, you can create a dummy variable (for eg a scalar) I think like

Code:
dimensionedScalar(tmp,s.dimensions(),SMALL)
Caelan
clapointe is offline   Reply With Quote

Reply

Tags
dimensions, openfoam 4.0 extend


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
potential flows, helmholtz decomposition and other stuffs pigna Main CFD Forum 1 October 26, 2017 09:34
[General] How to create an additional vector with {Field 4, Field 5, Field 6} Bombacar ParaView 1 August 15, 2015 19:05
New BoundaryCondition: how to modify a single component of a field? look86 OpenFOAM Programming & Development 4 August 28, 2012 17:48
How to define a field on a patch Aleksey_R OpenFOAM Programming & Development 1 July 9, 2012 12:23
Demagnetization field jan0385 ANSYS 0 April 12, 2012 10:09


All times are GMT -4. The time now is 14:43.