|
[Sponsors] |
[swak4Foam] How to use funkySetFields for surface scalar 'phi'? |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Member
Tony
Join Date: Nov 2013
Posts: 35
Rep Power: 13 ![]() |
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" 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. Code:
funkySetFields -field phi -expression 'phi/0.01575' -time 63 I really appreciate it if someone could give me a hand. Thank you very much. Kind regards, Tony |
|
![]() |
![]() |
![]() |
![]() |
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 ![]() ![]() |
Quote:
BTW: for a condition you'll want to use fpos() for the face positions
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
![]() |
![]() |
![]() |
![]() |
#3 |
Member
Tony
Join Date: Nov 2013
Posts: 35
Rep Power: 13 ![]() |
Dear Bernhard,
Thank you very much for the solution and your kind notice. I tried with interpolate() and it worked for internal fields, however, I couldn't change the values on the boundary (BTW, I am using cyclic boundary condition). Is it possible to get the flux value on boundary changed as well? Thanks and regards, Tony |
|
![]() |
![]() |
![]() |
![]() |
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 ![]() ![]() |
Quote:
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
![]() |
![]() |
![]() |
![]() |
#5 |
Member
Tony
Join Date: Nov 2013
Posts: 35
Rep Power: 13 ![]() |
Hi Bernhard,
Many thanks for your kind reply. I will have a look at that. Kind regards, Tony |
|
![]() |
![]() |
![]() |
Tags |
error, funkysetfields, phi |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
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 05:18 |
Division by zero exception - loop over scalarField | Pat84 | OpenFOAM Programming & Development | 6 | February 18, 2017 06:57 |
Issue symmetryPlane 2.5d extruded airfoil simulation | 281419 | OpenFOAM Running, Solving & CFD | 5 | November 28, 2015 14:09 |
Diverging solution in transonicMRFDyMFoam | tsalter | OpenFOAM Running, Solving & CFD | 30 | July 7, 2014 07:20 |
compressible flow in turbocharger | riesotto | OpenFOAM | 50 | May 26, 2014 02:47 |