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

Is there any code or function to know if simulation is running in 2D or 3D?

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By oswald

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 9, 2020, 08:15
Default Is there any code or function to know if simulation is running in 2D or 3D?
  #1
Senior Member
 
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 313
Rep Power: 15
agustinvo is on a distinguished road
Do you know if there is any kind of command to understand if the simulation is 2D or 3D? I was thinking about a patch loop and search for empty, but I don't know if there is something else to deal with this.


Thank you for your help!


Agustinvo
agustinvo is offline   Reply With Quote

Old   October 9, 2020, 10:14
Default
  #2
Member
 
Join Date: Sep 2010
Location: Leipzig, Germany
Posts: 93
Rep Power: 15
oswald is on a distinguished road
The mesh has a function called "nSolutionD()", as for example in GradientDispersionRAS.C it is used to check if is a 2D-simulation:

Code:
if (this->owner().mesh().nSolutionD() == 2)
s1291 and dkaddar like this.
oswald 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
[blockMesh] non-orthogonal faces and incorrect orientation? nennbs OpenFOAM Meshing & Mesh Conversion 7 April 17, 2013 05:42
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 01:27
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 10:23
Replacing mesh while running a simulation akultane CFX 1 November 15, 2009 13:46
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 06:51


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