|
[Sponsors] |
March 14, 2009, 16:37 |
electrostatic force with UDF
|
#1 |
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. |
|
March 24, 2009, 10:52 |
magnetostatic field in fluent
|
#2 |
New Member
souviktor
Join Date: Mar 2009
Posts: 11
Rep Power: 17 |
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.... |
|
March 24, 2009, 11:39 |
|
#3 |
Member
Henrik Ström
Join Date: Mar 2009
Posts: 33
Rep Power: 17 |
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 |
|
March 24, 2009, 14:10 |
|
#4 |
New Member
souviktor
Join Date: Mar 2009
Posts: 11
Rep Power: 17 |
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..... |
|
March 25, 2009, 05:48 |
|
#5 |
Member
Henrik Ström
Join Date: Mar 2009
Posts: 33
Rep Power: 17 |
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! :-)
|
|
|
|
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 05:37 |
electrostatic force-UDF ? | Zhenan | FLUENT | 5 | August 13, 2002 09:31 |
UDF for Electrostatic Field | Zhenan Li | FLUENT | 1 | August 11, 2002 22:58 |