How to create a dummy node (IB, IC) based on (I)th node

Skip to first unread message

Mar 12, 2022, 8:33:29 AM3/12/22
to OpenFOAM
Hello Foamers,
Consider the region of interest to be divided into N elements (I= 1 to N). In my work, I need to duplicate the node as (IB, IC) for a purpose.
Let's say,
for(I = 1 to N)
if (T[I] == 100)
IB = I;
for(I=IB+1 to N)
if (T[I] < 100)
IC = I;
Here are my queries,
(1) How to declare the for loop specifically (marked in bold) in OpenFOAM?
(2) How to address IB and IC  (marked in italic)  ? Like if its scalar variable we can declare "scalar IB" but that's not gonna work here.
Kindly someone share the ideas.
Thank you
Reply all
Reply to author
0 new messages