|October 30, 2012, 15:20||
Join Date: May 2009
Location: Montreal, QC
Blog Entries: 1Rep Power: 14
You have different options and one of them is implementation of MHD module, but it's not really necessary for such simple purpose.
All you need is to add a source term to the NS equation; for this aim, refer to the UDF manual and read the explanation and examples of DEFINE_SOURCE macro.
PS: The goal of this community is to learn you fishing not to provide a fish!
|October 31, 2012, 10:05||
Join Date: Oct 2012
Posts: 32Rep Power: 5
I didn't want a solution but I asked sb to help me to start writing my UDF. do you mean i can add a momentum source to NS equation?
I don't think it is a matter if sb could help me by wrinting a UDF for me too!
thank you Amir
|January 15, 2013, 08:49||
Join Date: Jan 2013
Posts: 47Rep Power: 4
I want to define Body force for particles in DPM Model, F=C*(density_liquid/density_particle)*(velocity_liquid - velocity_particle)*▽*velocity_liquid. the ▽*velocity_liquid is rotation of liquid.
1.Could you help me how to calculate this value ?
2.If I defined body force for particle and hooked it, do I need to define an oppsite force for the liquid? Does the FLUENT add this force to liquid automatically with an oppsite vector ?
|February 20, 2013, 14:23||
Join Date: May 2012
Posts: 2Rep Power: 0
Hi,I have a similar problem. I am working on adding a body force to navier stokes equation, which is a function of voltage and charge density.
I added Voltage and charge density as two UDS,0 and 1 respectively. For UDS'0' (volt), I use poissons potential equation i.e., del^2(V) = -rho_q/enod. So,diffusivity is -1 and source term is charge_density/e_nod. For UDS'1', I use charge conservation equation. i.e., grad(charge_density*mu_constant*E) = 0 where E = -grad(V). So, I use flux equation, calculate gradv term at face by taking average of two neighbour cells or zero if its boundary.
source = -( C_UDSI(c,t,1) ) / (8.8514e-12) ;
dS[eqn] = 0 ;
return source ;
NV_VS_VS(fluxvec, =, C_UDSI_G(c0,t0,0), * , 0.5, + , C_UDSI_G (c1,t1,0) , * , 0.5 ) ;
flux = -NV_DOT(fluxvec, A)*2e-4; /* Average flux through face */
two electrodes surrounded by air. one electrode with 27k volt and charge density as 0.016. another electrode with 0 volt and o charge density.
I get Nan values for UDS-1 (charge density) when I initialise it with anything except zero. If I initialise UDS-1 with 0 then the residual monitors of UDS-1 instantly go to e-43 values. But I see changes in UDS scalars only near electrodes and near domain boundaries, rest of the domain has constant UDS values.
initialising without udf and then adding them after some iterations....but no luck.
I am guessing its sth to do with flux equation in that UDS-1 equation. Could anyone please help me with finding the error.
|August 1, 2013, 13:34||
Join Date: Feb 2012
Posts: 15Rep Power: 5
Since we can only take the gradient of a vector in FLUENT, to calculate laplacian of a vector whose value is stored in a UDS C_UDSI(c,t,0), for example two dimensional d2f/dx2+d2f/dy2, you can use one C_UDSI(c,t,1) to store df/dx (C_UDSI_G(c,t,0)) and a second C_UDSI(c,t,2) to store df/dy(C_UDSI_G(c,t,0)), then, take gradient of C_UDSI(c,t,1) and C_UDSI(c,t,2), then the laplacian = C_UDSI(c,t,1)+C_UDSI(c,t,2)
|Thread||Thread Starter||Forum||Replies||Last Post|
|UDF for body force in DPM||elah599||Fluent UDF and Scheme Programming||52||June 17, 2012 07:38|
|Step-by-Step Procedure for DPM body force||wwt650420||FLUENT||8||January 6, 2012 21:06|
|Force can not converge||colopolo||CFX||13||October 4, 2011 22:03|
|DPM Body Force||Sandilya Garimella||FLUENT||1||April 8, 2008 03:30|
|DPM body force Doubt||Sandilya||FLUENT||0||May 21, 2007 13:32|