UDM derivatives for  for EHD flow
Hello All
I am writing a UDF to solve for two scalars with source terms The details of user defined scalars are UDS0 is potential UDS1 is charge density I am solving for an EHD flow now using a formula I am writing a UDM such that UDM0 = f(UDS0) UDM1 = f(UDS1) where f() represents "function of" Now the source terms of my equations for UDS0 and UDS1 depend upon derivatives of UDM0 and UDM1 hence I need to calculate these derivatives Now, Derivatives for UDS in any cell can be got by UDSI_G(c,t,f)[] Similarly is there a macro to get derivatives of UDM in each cell Would be glad if someone could point me to correct source or solution to my requirement Thank you Regards Sandilya 
Re: UDM derivatives for  for EHD flow
Hello All
I am writing a UDF to solve for two scalars with source terms. The details of user defined scalars are UDS0 is potential UDS1 is charge density I am solving for an EHD flow Now using a formula I am writing a UDM such that UDM0 = f(UDS0) UDM1 = f(UDS1) where f() represents "function of" Now the source terms of my equations for UDS0 and UDS1 depend upon derivatives of UDM0 and UDM1 hence I need to calculate these derivatives. Now, Derivatives for UDS in any cell can be got by UDSI_G(c,t,f)[] Similarly is there a macro to get derivatives of UDM in each cell Would be glad if someone could point me to correct source or solution to my requirement Thank you Regards Sandilya 
Re: UDM derivatives for  for EHD flow
Have you tried manually calculating the derivatives in the the source code?

Re: UDM derivatives for  for EHD flow
I did and it works but the expressions are cumbersome and i want to make code easily understandable!!! Can we extract derivatives of UDM's?

Re: UDM derivatives for  for EHD flow
Hi,Sandilya. As I know for modeling of EHD with fluent you need to calculate E that is derivative of potential. For this you must define Ex and Ey in the Adjust part of your UDF like this:"C_UDMI(c,t,0)=C_UDSI(c,t,0);C_UDMI(c,t,1)=C_ UDSI_G(c,t,0)[0];C_UDMI(c,t,2)=C_UDSI_G(c,t,0)[1];" where C_UDSI(c,t,0) is potential. After this, you can use C_UDMI(c,t,1),C_UDMI(c,t,2) in other parts of your UDF for Ex and Ey. I hope this is useful for you.
Regards 
Sandiya,
This is very late...but I am trying to do a ehd simulation as well and am having problems with one of the source terms in the space charge transport equation, whenever I have a source term as dV/dX (gradient of potential), my solution diverges...I have tried storing the gradients in a define adjust and then using the C_UDMI values...but it doesnt make a difference...so when I add the source term Q*E_x on the xdirection momentum equation as: C_UDSI(c,t,1)*C_UDSI_G(c,t,0)[0] the solution diverges...and the same goes for the source term in the space charge transport equation which depends on electric field...please help if you can AK 
Hi Reza  regarding your code above, why do you need the line C_UDMI(c,t,0) = C_UDSI(c,t,0) if you are not using it in calculating the components of electric fields. I am trying to do this also and I'm getting access errors even when I include this line. The following is my adjust function  if you spot any major errors please let me know.
#include "udf.h" #include "sg.h" DEFINE_ADJUST(udf_adjust, domain) { Thread *t; cell_t c; thread_loop_c(t,domain) { begin_c_loop(c,t) { C_UDMI(c,t,0) = C_UDSI(c,t,0) ; /**/ /* udm 0 > Electric field axial component */ /**/ C_UDMI(c,t,1) =  C_UDSI_G(c,t,0)[0] ; /**/ /* udm 1 > Electric field radial component */ /**/ C_UDMI(c,t,2) =  C_UDSI_G(c,t,0)[1] ; /**/ /* udm 2 > Electric field magnitude */ /**/ C_UDMI(c,t,3) = NV_MAG(C_UDSI_G(c,t,0)) ; } end_c_loop(c,t) } } 
Hi,can any body help me about ehd on fluent,i have some experimental data on ehd.i want to model it in fluent but i have not any code of ehd in fluent.please help me abut how to model ehd in fluent,thank you.
e.shabahang@gmail.com 
All times are GMT 4. The time now is 02:30. 