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

electrostatic force with UDF

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 14, 2009, 16:37
Default electrostatic force with UDF
  #1
Jinfeng
Guest
 
Posts: n/a
I am modeling the air flow which is driven by the ionic wind.

I want to include an electrical body force into the Momentum equations to solve the flow field. I already have the electrical field results (voltage and space charge density) in the format of notepad files. How do I use UDF to do this? Do I need to use "DEFINE_SOURCE" to add a source term on each momentum euqation (x, y and z)? Or how should I do it? How do I read a .txt file into Fluent?

Any help or suggestion would be greatly apprecited! Thanks.
  Reply With Quote

Old   March 24, 2009, 10:52
Default magnetostatic field in fluent
  #2
New Member
 
souviktor
Join Date: Mar 2009
Posts: 11
Rep Power: 8
Souviktor is on a distinguished road
Hi Jinfeng,

I am also doing almost the same thing(rather trying to do ),In my case I have to incorporate a magnetostatic body force term in the fluent solver.

Yes, you are absolutely on the right track...you have to use the define_source macro to do that.Just compute the expression of the force in N/m3 unit (because source terms of momentum equation have to be of that unit) for any cell inside the domain...I mean u don't have to loop over the cells.Fluent will do it for you.Just use the passed cell variable c to access cell properties like temperature (c_t macro),centroid of the cell (c_centroid macro) etc . if you need them.
For my case as the field expression is fairly simple I can calculate it in the udf itself.If it is problematic for you,you can possibly read data file (your field) in the udf ,check udf manual...


The problem however in my case is to linearize the source term.For my case it depends on temperature gradient and other parameters which are independent of the flow.So I am confused how to linearize it if at all.

one more thing do anyone know how to access the adjacent cell properties ?because I have to calculate temperature gradient and as fluent does not offer such thing directly I might have to use finite difference formula to compute it from the temperature values of the adjacent cells....
Souviktor is offline   Reply With Quote

Old   March 24, 2009, 11:39
Default
  #3
Member
 
Henrik Ström
Join Date: Mar 2009
Posts: 32
Rep Power: 8
HenrikS is on a distinguished road
You do not need to linearize, unless you benefit from it in solver stability.

You can see in the UDF manual how to access adjacent cell properties. The gradients are available directly, however. C_T_G(c,t) is the temperature gradient vector in the cell, for example. You might need to specify that the solver shall not remove gradient data from memory, if you require at some point the gradient of a variable that is not currently solved for. How to do this is also written in the UDF manual.

Hope this helps.

/Henrik
HenrikS is offline   Reply With Quote

Old   March 24, 2009, 14:10
Default
  #4
New Member
 
souviktor
Join Date: Mar 2009
Posts: 11
Rep Power: 8
Souviktor is on a distinguished road
Thanks HenrikS

Yeah I am actually shaping up to do that (c_t_g), although in manual they clearly said it requires a bigger RAM....I have 1 gb ram...just wondering if it will drink up all the memory...I'll give it a definite try.....
Souviktor is offline   Reply With Quote

Old   March 25, 2009, 05:48
Default
  #5
Member
 
Henrik Ström
Join Date: Mar 2009
Posts: 32
Rep Power: 8
HenrikS is on a distinguished road
I guess that will depend on the size of your mesh. I have used it several times and I have never had any problems. Good luck! :-)
HenrikS 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
Modeling Electrostatic Force in a ESP Ganapathy FLUENT 0 March 5, 2009 01:27
electrostatic precipitators joanna Main CFD Forum 0 November 20, 2006 09:41
electrostatic sources pi CFX 2 July 4, 2005 04:37
electrostatic force-UDF ? Zhenan FLUENT 5 August 13, 2002 08:31
UDF for Electrostatic Field Zhenan Li FLUENT 1 August 11, 2002 21:58


All times are GMT -4. The time now is 05:00.