CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Fluent UDF and Scheme Programming

(ask)A udf about electric field

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 15, 2013, 22:35
Question (ask)A udf about electric field
  #1
New Member
 
Wu Zhuo
Join Date: Apr 2013
Posts: 3
Rep Power: 3
mumu678 is on a distinguished road
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.
mumu678 is offline   Reply With Quote

Old   April 16, 2013, 01:56
Default
  #2
Senior Member
 
A CFD free user's Avatar
 
A-A Azarafza
Join Date: Jan 2013
Posts: 175
Rep Power: 3
A CFD free user is on a distinguished road
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
__________________
Regard yours
A CFD free user is offline   Reply With Quote

Old   April 16, 2013, 02:30
Default
  #3
New Member
 
Wu Zhuo
Join Date: Apr 2013
Posts: 3
Rep Power: 3
mumu678 is on a distinguished road
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
mumu678 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Field functions and table crevoise CD-adapco 0 March 20, 2013 11:51
UDF for magnetic field nasser Fluent UDF and Scheme Programming 0 March 4, 2013 11:35
Effects of droplets to each other in an electrostatic field alighaffari Fluent UDF and Scheme Programming 3 July 10, 2012 23:56
How to add a UDF to a compiled UDF library kim FLUENT 3 October 26, 2011 21:38
UDF programming fullmonty FLUENT 5 June 30, 2011 02:40


All times are GMT -4. The time now is 18:02.