|
[Sponsors] |
June 3, 2020, 11:15 |
CEL Step function use
|
#1 |
Member
Anonymous
Join Date: Jan 2012
Location: Canada
Posts: 65
Rep Power: 14 |
I would like to know if it is possible to use a step function to help me sum values above a cell's "y" coordinate in a subdomain.
Essentially I would like to do the following pseudo code using step(), and sum(): ycor = y coordinate of cell of interest for i = 1:number of cells in subdomain if y < ycor, variable = 0 sum(variable)@subdomain I was hoping to nest a step function inside sum, e.g. sum(step()*variable)@subdomain. Except I am unsure if this possible using CEL, mainly because I can't envision how to use the cell's current location as a marker in the step function. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
courant number increases to rather large values | 6863523 | OpenFOAM Running, Solving & CFD | 22 | July 5, 2023 23:48 |
[Other] mesh airfoil NACA0012 | anand_30 | OpenFOAM Meshing & Mesh Conversion | 13 | March 7, 2022 17:22 |
Floating point exception error | lpz_michele | OpenFOAM Running, Solving & CFD | 53 | October 19, 2015 02:50 |
ParaView for OF-1.6-ext | Chrisi1984 | OpenFOAM Installation | 0 | December 31, 2010 06:42 |
Could anybody help me see this error and give help | liugx212 | OpenFOAM Running, Solving & CFD | 3 | January 4, 2006 18:07 |