|
[Sponsors] |
[swak4Foam] Using calculated swak expressions in another functions |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 21, 2016, 08:06 |
Using calculated swak expressions in another functions
|
#1 |
Member
Arsalan
Join Date: Jul 2014
Posts: 74
Rep Power: 11 |
Dear Foamers,
How could I use the calculated swak expressions at other functions for example like below: Code:
createInterface { type createSampledSurface; outputControl timeStep; outputInterval 1; surfaceName interface; surface { type isoSurface; isoField alpha.water; isoValue 0.5; interpolate true; } } surface { ignore_unimplemented_simpleFunctionObject::movePoints true; type swakExpression; valueType surface; surfaceName interface; verbose true; expression "sum(area())"; accumulations ( min ); autowrite true; } k { aliases { alphawater alpha.water; } ignore_unimplemented_simpleFunctionObject::movePoints true; type swakExpression; valueType internalField; variables ( "thres=0.5;"//which cells to keep "VolC= sum (alphawater < thres ? C*vol() : 0);" ); expression "VolC/surface"; accumulations ( average ); } Moreover, we couldn't calculate area() in the k function separately because this function has an internalField valueType while using area() needs a surface valueType! The second question is how could we use the runTime() value in the functions? I think it has a keyword but I don't remember that. Any help and comment will be appreciated. Regards, Arsalan. |
|
Tags |
internalfield, surface, swak4foam, swakexpression |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
One more time: wall functions - SST | CellZone | OpenFOAM Pre-Processing | 22 | June 11, 2021 13:27 |
Wall functions - questions about implementation | AlmostSurelyRob | OpenFOAM Programming & Development | 44 | May 6, 2020 10:11 |
Wall functions vs. boundary layers | kandelabr | OpenFOAM Running, Solving & CFD | 3 | June 12, 2017 07:05 |
When I use the wall functions....! | maximus | Main CFD Forum | 7 | January 20, 2003 09:35 |
N-S equations:divergence free functions? | D. Puigjaner | Main CFD Forum | 1 | July 27, 2000 12:43 |