CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (http://www.cfd-online.com/Forums/fluent-udf/)
-   -   (ask)A udf about electric field (http://www.cfd-online.com/Forums/fluent-udf/116245-ask-udf-about-electric-field.html)

mumu678 April 15, 2013 22:35

(ask)A udf about electric field
 
Hi all
this is a code about the current density
DEFINE_ADJUST(current_density,d)
{
Thread *t;
cell_t c;

if (! Data_Valid_P())
return;

thread_loop_c(t,d)
{
begin_c_loop(c,t)
{
C_UDMI(c,t,0)=-1*C_UDSI_DIFF(c,t,0)*C_UDSI_G(c,t,0)[0];
C_UDMI(c,t,1)=-1*C_UDSI_DIFF(c,t,0)*C_UDSI_G(c,t,0)[1];
C_UDMI(c,t,2)=-1*C_UDSI_DIFF(c,t,0)*C_UDSI_G(c,t,0)[2];
}
end_c_loop(c,t)
}
}

howeve,the contour dispaly the udm0,1,2=0.and i also use the solve/set/expert .
Can anyone help me ?
thanks.:)

A CFD free user April 16, 2013 01:56

Hey
Actually, I don't know the answer for your question, just it seems that you are working on fuel cell. if yes, I would like to ask you a question. Is it possible to define current density instead of electrical potential using UDS? If so, are we allowed to use conductivity coefficient which appears in electric potential gradiant for current density gradiant too? I'll be waiting for your reply.
Thanks in advance

mumu678 April 16, 2013 02:30

I am not working on fuel cell.
I dont konw whether we can use current density
but it is more convenient to use electrical potential
:)


All times are GMT -4. The time now is 11:24.