|
[Sponsors] |
setExprBoundaryFields not reading condition expression |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 27, 2022, 05:26 |
setExprBoundaryFields not reading condition expression
|
#1 |
Member
Luca
Join Date: Mar 2011
Location: Italy
Posts: 62
Rep Power: 15 |
Dear Foamers,
I am encountering a problem using setExprBoundaryField with OF-2106. Indeed, it seems that it cannot read the condition specified in the dictionary below. Can someone explain me the reason? Thank you in advance, Luca Code:
updateBCs { field T; nonUniformHeatFlux { target value; variables ( "zMin = 5" "zMax = 10" ); condition #{ (pos().z() > zMin && pos().z() < zMax) #}; expression #{ pos().z() #}; } expressions ( { $nonUniformHeatFlux; patch walls; } ); } I have realized that the conditional statement works if inside the expression, as listed in the code below: Code:
updateBCs { field T; nonUniformHeatFlux { target value; variables ( "zMin = 5" "zMax = 10" ); // condition // #{ // (pos().z() > zMin && pos().z() < zMax) // #}; expression #{ (pos().z() > zMin && pos().z() < zMax) ? pos().z() : 0 #}; } expressions ( { $nonUniformHeatFlux; patch walls; } ); } Last edited by marluc; March 27, 2022 at 13:15. Reason: workaround |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Commercial meshers] fluentMeshToFoam: "fluent patch type shadow not recognised" | preibie | OpenFOAM Meshing & Mesh Conversion | 28 | March 29, 2017 04:56 |
execFlowFunctionObjects - unknown field problem | Toorop | OpenFOAM Post-Processing | 16 | March 14, 2016 03:25 |
writing execFlowFunctionObjects | immortality | OpenFOAM Post-Processing | 30 | September 15, 2013 06:16 |
How to install CGNS under windows xp? | lzgwhy | Main CFD Forum | 1 | January 11, 2011 18:44 |
Lift, Drag Vs time chart,calculations | Jamesd69climber | CFX | 8 | February 17, 2005 17:23 |