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

Conditional statement over the entire mesh

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   November 23, 2010, 06:16
Default Conditional statement over the entire mesh
  #1
Member
 
Carlos Xisto
Join Date: Nov 2009
Location: Covilhã, Portugal
Posts: 53
Rep Power: 16
xisto is on a distinguished road
Send a message via MSN to xisto
Dear All,

I want to do an if conditional statement for two variables witch are surfaceScalarFields (MR_N and ML_N).

The code compile without erros, on the other and this will result in a infinite loop.


Code:
forAll(mesh.faces(),faceI)   


  {

 if(mag(MR_N[faceI]) >= scalar(1.0)) 
     {
      
         surfaceScalarField            M4_neg = M1_neg; 
         surfaceScalarField            P5_neg = 1.0/(2.0*MR_N)*(MR_N-mag(MR_N)); 

    

   if(mag(ML_N[faceI]) >= scalar(1.0)) /

      {
         surfaceScalarField     M4_pos = M1_pos; 
         surfaceScalarField     P5_pos = 1.0/(2.0*ML_N)*(ML_N+mag(ML_N)); 
      }
      
  }
Any suggestions?

Cheers

Carlos
xisto 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
Dynamic Mesh Problem. Tom Clark FLUENT 10 June 21, 2021 04:27
[ICEM] Hexa Mesh Smoothing Jules ANSYS Meshing & Geometry 6 December 4, 2010 18:00
2d irregular grid Remy Main CFD Forum 1 December 22, 2008 04:49
basic of mesh refinement arya CFX 4 June 19, 2007 12:21
Mesh Refinement JY Siemens 7 September 19, 2002 13:37


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