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

18 views
Skip to first unread message

kumaresh...@gmail.com

unread,
Mar 12, 2022, 8:33:29 AMMar 12
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
Forward
0 new messages