maria.marinari
Subscriber

Thanks so  much. This is my code I am trying to get it to do a different profile at different iteration:

/***********************************************************************
UDF for specifying a radially dependent boundary profile for an actuator disk
************************************************************************/
#include "udf.h"
#include "math.h"
#define R 89.15
#define pi 3.1416


Message("print outside macro");
DEFINE_PROFILE(P_profile,t,i)
{

    real A[ND_ND], r, U, thrust, Normalizer;  /* this will hold the position vector */
     Message("print inside macro");
    U = Get_Input_Parameter("real-1");
    thrust = Get_Input_Parameter("real-3");
    Normalizer = 3*(U*-30+(U*U)*2);
    face_t f;
    begin_f_loop(f,t)
    if (N_ITER == 0)
        {
            Message("print for 0th itteration");
            F_PROFILE(f, t, i) = thrust / (pi * pow(U,2));
        }
        else
        {
            Message("itteration in if accessing else sesction: %d\n", N_ITER);
            F_CENTROID(A,f,t);
            r = pow((pow(A[0], 2) + pow(A[1], 2)), 0.5);
            F_PROFILE(f, t, i) = (thrust/ Normalizer)* U*r;

        }
    end_f_loop(f,t)

}