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

Problem with MHD module and writing the UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 2, 2015, 10:40
Default Problem with MHD module and writing the UDF
  #1
New Member
 
Amin Rahmat
Join Date: Jul 2014
Posts: 4
Rep Power: 11
aminrahmat is on a distinguished road
Dear all,

I am trying to model a two-phase problem using VOF model having an electrical field affecting my leaky conductive fluid phases with Fluent 14.5. I have tried a couple of approaches but it seems that the best way is to add the MHD module to the Fluent. However, I have a problem with the module. Before describing the problem, I'd better state that the forces that I am looking for are known as the Coulomb and Polarization forces derived from the Maxwell stress tensor in the form of F = q E - 0.5 E^2 grad(epsilon) where q is the surface charge density, E is the electric field and epsilon is the electric permittivity.

Initially, when I add the MHD module and run it, it solves and delivers the electric field nicely, but there is no force on my system (it has its own source terms being added to the momentum equation). I also tried to write a UDF file to add the forces separately to the momentum equation but I am having the following error:

Error:
C:\ANSYSI~1\v145\fluent\fluent14.5.7\win64\2ddp\fl 1457s.exe received fatal signal (ACCESS_VIOLATION)
1. Note exact events leading to error.
2. Save case/data under new name.
3. Exit program and restart to continue.
4. Report error to your distributor.
Error Object: #f

For the UFD file, since the added variable are being used by UDMs, I have used the C_UDMI(c,t,9) & C_UDMI(c,t,10) as the sources of my electric field in the EHD force equation.

Am I doing a mistake somewhere (for sure I do)? I would be pleased to receive your comments about it.

Thanks,
aminrahmat is offline   Reply With Quote

Old   July 1, 2017, 12:36
Default
  #2
New Member
 
Aureliano Sancho
Join Date: May 2013
Location: Salvador-Ba-Brasil
Posts: 26
Rep Power: 12
SanchoBuendia is on a distinguished road
Dear Amin,

I hope that have gotten to resolve your problem. I'm trying to do something similar and need help.
I'm trying to do a model with flux of the fluid electrically charger in channel with surface density of charge too. Could you tel me how can I do this? How do I put charge in fluid and in channel?

Thanks
SanchoBuendia is offline   Reply With Quote

Old   March 2, 2020, 04:57
Default
  #3
New Member
 
Krishnaprasad
Join Date: Jun 2017
Posts: 3
Rep Power: 8
kp561997 is on a distinguished road
Dear Amin,

I am working on a problem similar to yours. I hope you have resolved your problem. If you have, can you tell me how you accomplished it?
TIA
kp561997 is offline   Reply With Quote

Old   March 2, 2020, 05:23
Default Problem
  #4
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
Could you describe the problem you are facing?
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   March 2, 2020, 07:21
Default
  #5
New Member
 
Krishnaprasad
Join Date: Jun 2017
Posts: 3
Rep Power: 8
kp561997 is on a distinguished road
I am currently using Fluent to study the droplet deformation under the influence of Electric field using the leaky dielectric model.
I am using a User Defined Scalar (phi) to obtain the electric potential. I am facing problems in using this solution to calculate the source term for the momentum equation.
The equation for the Electric force, as mentioned above is
F = q*E - 0.5*epsilon*E^2.
where
q = div(epsilon*E) where E = -grad(phi).
q = epsilon*div(E) + E.grad(epsilon)
I am unsure how to calculate the divergence of the electric field i.e. the Laplacian of the electric potential using a UDF.

Can you direct me on how to calculate the Laplacian of a User defined scalar in Fluent? Am I proceeding in the right direction or do I need to adopt a different approach?
kp561997 is offline   Reply With Quote

Old   March 2, 2020, 07:33
Default Gradient and Divergence
  #6
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
You may calculate gradient and divergence using UDSI_G or UDSI_RG (if you want to use bounded gradients), however, Fluent has an in-built Electric Potential model; separate from MHD module. You may use that, provided you are using rather newer version, such as 18.x or later.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Reply

Tags
fluent 14.5, mhd, two-phase flow, udf


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
Running four serial jobs at the same time on the same computer JuPa CFX 8 August 11, 2014 07:02
what's the problem sjtusyc CFX 1 August 5, 2012 08:33


All times are GMT -4. The time now is 06:48.