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

[swak4Foam] How to use funkySetFields for surface scalar 'phi'?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By gschaider

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   March 19, 2014, 17:59
Default How to use funkySetFields for surface scalar 'phi'?
  #1
Member
 
Tony
Join Date: Nov 2013
Posts: 35
Rep Power: 12
wzx1989221 is on a distinguished road
Hi everyone,

I met a problem when using funkySetFields for surface scalar field 'phi'. Basically I want to non-dimensionalise my case through dividing the fields by its reference values. I used the code below for velocity and pressure fields and they worked fine.

Code:
funkySetFields -field p -keepPatches -expression 'p/0.030625' -time 63 -condition "mag(vector(pos().x,pos().y,0))<=1.0"
Code:
funkySetFields -field U -keepPatches -expression 'U/0.175' -time 63 -condition "mag(vector(pos().x,pos().y,0))<=1.0"
However, when it comes to the surface scalar field 'phi', the error turned up like this:
Code:
--> FOAM FATAL ERROR:
 Parser Error for driver FieldValueExpressionDriver at "1.5-11" :"syntax error, unexpected number"
"phi/0.01575"
      ^^^^^^^
------|

Context of the error:


- Driver constructed from scratch
  Evaluating expression "phi/0.01575"


    From function parsingValue
    in file lnInclude/CommonValueExpressionDriverI.H at line 1081.
This is the code I use for phi:
Code:
funkySetFields -field phi -expression 'phi/0.01575' -time 63
Why I can't use funkySetFields for phi? Is there anything wrong in my code?

I really appreciate it if someone could give me a hand. Thank you very much.

Kind regards,
Tony
wzx1989221 is offline   Reply With Quote

 

Tags
error, funkysetfields, phi


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
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' muth OpenFOAM Running, Solving & CFD 3 August 27, 2018 04:18
Division by zero exception - loop over scalarField Pat84 OpenFOAM Programming & Development 6 February 18, 2017 05:57
Issue symmetryPlane 2.5d extruded airfoil simulation 281419 OpenFOAM Running, Solving & CFD 5 November 28, 2015 13:09
Diverging solution in transonicMRFDyMFoam tsalter OpenFOAM Running, Solving & CFD 30 July 7, 2014 06:20
compressible flow in turbocharger riesotto OpenFOAM 50 May 26, 2014 01:47


All times are GMT -4. The time now is 07:13.