CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

DPM body force to express electric forces

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 30, 2012, 14:20
Default
  #21
Senior Member
 
Amir's Avatar
 
Amir
Join Date: May 2009
Location: Montreal, QC
Posts: 735
Blog Entries: 1
Rep Power: 22
Amir is on a distinguished road
Quote:
Originally Posted by Payam89 View Post
Hi

I have a Electric field in my flow in FLUENT which it's function is

E=Q/2*pi*E0 (1/X +1/S-X )

Q=1 electric charge
pi=3.141
E0=electric permability
X= x direction
S=1.87 cm

please help me to write a UDF

Should i use MHD?

PLEASEEE.....
Hi,

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!

Bests,
Payam89 likes this.
__________________
Amir
Amir is offline   Reply With Quote

Old   October 31, 2012, 09:05
Default Electric Field
  #22
Member
 
payamfadaei
Join Date: Oct 2012
Location: Mashhad/Iran
Posts: 32
Rep Power: 13
Payam89 is on a distinguished road
Send a message via Skype™ to Payam89
Quote:
Originally Posted by Amir View Post
Hi,

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!

Bests,
Thank you

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
Payam89 is offline   Reply With Quote

Old   January 15, 2013, 07:49
Default
  #23
Member
 
Yanlong Li
Join Date: Jan 2013
Location: BeiJing
Posts: 47
Rep Power: 13
Yanlong Li is on a distinguished road
Dear Qin,
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 ?
Yanlong Li is offline   Reply With Quote

Old   February 20, 2013, 13:23
Default
  #24
New Member
 
Raghuvir
Join Date: May 2012
Location: India
Posts: 2
Rep Power: 0
Raghuvir is on a distinguished road
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.

UDS-0 :-
source = -( C_UDSI(c,t,1) ) / (8.8514e-12) ;
dS[eqn] = 0 ;
return source ;

UDS-1:-


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 */
return flux;


Model :-

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.

PROBLEM :-


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.

I Tried
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.
Raghuvir is offline   Reply With Quote

Old   August 1, 2013, 13:34
Default
  #25
New Member
 
Qin
Join Date: Feb 2012
Posts: 15
Rep Power: 14
adam14qin is on a distinguished road
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)[0]) and a second C_UDSI(c,t,2) to store df/dy(C_UDSI_G(c,t,0)[1]), then, take gradient of C_UDSI(c,t,1)[0] and C_UDSI(c,t,2)[1], then the laplacian = C_UDSI(c,t,1)[0]+C_UDSI(c,t,2)[1]
adam14qin is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Step-by-Step Procedure for DPM body force wwt650420 FLUENT 10 March 22, 2017 10:03
UDF for body force in DPM elah599 Fluent UDF and Scheme Programming 52 June 17, 2012 07:38
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


All times are GMT -4. The time now is 19:46.