August 1, 2023 at 5:47 pm
Diogo Martinho
Subscriber
Hi,
Thanks for your attention and answer.
Can I just ask you as an overview. If I wanted to define something as the previous equation could I use something like:
Thread *mixture_thread;
Thread **pt; /* initialize pt */
pt = THREAD_SUB_THREADS(mixture_thread);
So, at the end it would look something like:
DEFINE_DIFFUSIVITY(diff_uds, c, t, uds_i)
{
double diff = Diff_nil, lam;
double T = T0;
int Zone_ID = THREAD_ID(t);
Thread *mixture_thread;
Thread **pt; /* initialize pt */
pt = THREAD_SUB_THREADS(mixture_thread); /* I think pt[0] is liquid; pt[1] is gas */
if (uds_i == C_H2)
{
if (Zone_ID == Membrane)
diff=Diff_H2(c,t)*pow(Get_Porosity(c,t),1.5)*C_VOF(c,pt[0]);
else if (Zone_ID == Nelectrode || Zone_ID == Pelectrode)
diff=Diff_H2(c,t)*pow(Get_Porosity(c,t),1.5)*C_VOF(c,pt[0]);
else if (Zone_ID == ext_neg) // This is changed. It was commented out previously.
diff=Diff_H2(c,t)*pow(Get_Porosity(c,t),1.5)*C_VOF(c,pt[0]);
else
diff=Diff_nil;
Kind regards,
Diogo
Diogo