CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

CEL Step function use

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   June 3, 2020, 11:15
Default CEL Step function use
  #1
Member
 
Anonymous
Join Date: Jan 2012
Location: Canada
Posts: 65
Rep Power: 14
Industrial_CFD is on a distinguished road
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.
Industrial_CFD is offline   Reply With Quote

 


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
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


All times are GMT -4. The time now is 23:46.