-
-
April 12, 2023 at 11:46 pm
EmilGr
SubscriberHello.
i am modelling a fluid flow in a micorlfuidic channel. I would like to include the influence of an electric field (no current!) on this flow, the electrodes are on the two side walls ofthe channel, there is a thin layer of polymer between them and the fluid in the channel. I know fluent provides the electric potential model, however, as far as i understand it aways include current and as i said i would like to describe a pure el. field. Could you give me some hints of what to do?Thank you!
-
April 13, 2023 at 1:38 pm
Rob
Ansys EmployeeIf there's no current how is there a field?
-
April 14, 2023 at 8:21 pm
EmilGr
SubscriberHello Rob,
Thank you for the responds. You are partially right, It is possible however also to achieve a small field without current. I managed with the activation of the mhd module in ansys. In the next step i try to create an UDF for defining an AC voltage on the walls as a boundary condition. I am sorry to ask this question, I hate when people post random UDF codes, expecting that other help them but I really struggle with this one. So my code looks like this:#include "udf.h"#include "math.h"DEFINE_PROFILE(voltage_profile, thread, position){real t = CURRENT_TIME; // get current simulation timereal V0 = 220.0; // set peak voltage to 220 Vreal freq = 50.0; // set frequency to 50 Hzreal w = 2.0*M_PI*freq; // calculate angular frequencyface_t f;real A, V, phase;A = V0/2.0; // calculate amplitude of sinusoidal voltagephase = 0.0; // set phase shift to zerobegin_f_loop(f, thread){if (BOUNDARY_FACE_THREAD_P(f, thread)){V = A*sin(w*t + phase); // calculate voltage at current timeF_PROFILE(f, thread, position) = V; // set voltage at wall face}}end_f_loop(f, thread);}However it is showing me following errors, which are maybe linked to the logic of the code:Error: C:/Users/49157/AppData/Local/Temp/voltage.c.6596.0.c: line 18: parse error.
Error: C:/Users/49157/AppData/Local/Temp/voltage.c.6596.0.c: line 24: parse error.
Again, I am sorry if this is not the correct place for debugging codes but could you at least give me a small hint.
Best,
Emil
-
April 18, 2023 at 10:15 am
Rob
Ansys EmployeeProfiles are assigned to surfaces manually, so I suspect the if (BOUNDARY_FACE_THREAD_P(f, thread)) part is either unnecessary or undefined within the macro. Check the lines the error is reporting, and then for parse errors look at that line and the few above: the common cause is a missing ; but I can't see that here.
-
May 11, 2023 at 6:57 pm
EmilGr
SubscriberThank you for the reply, the UDF works indeed when i delete the if loop. I have a question regarding the electric field again … As mentioned I am using the MHD module in Fluent for simulating electric field in a microchannel. There is however, a certain problem on my side with understanding how exctly this module works. So when I apply the UDF as a boundary condition on one of the walls, it works fine, there is no electric field generated, just potential. There is, however in the boundary condition tab, another menu where one can define a UDS for the potential of the wall. When i define this UDS potential, i get indeed an electric field in my system, even without any current. So can someone please explain me what is the difference between the “standard” boundary condition where i can define with the UDF and the UDS value for the potential which is also in the boundary condition menu. The problem is I cannot apply my UDF for AC voltage into this UDS tab as my simulation crashed. Thank you!
P.S. Yes I already looked into the Users Manual of Fluent, however this type of details are not fully explained there
-
May 12, 2023 at 9:30 am
Rob
Ansys EmployeeSaves me asking the usual question! :)
A scalar is an extra equation we solve over the top of the normal model. Check scalar diffusivity (no one ever looks at the materials panel) but it's also possible the solver is struggling with scalar gradient/motion as not all of the usual stability numerics apply. If it's not in the manual I can't really comment, and electric fields are one of the areas I know very little about.
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Suppress Fluent to open with GUI while performing in journal file
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Getting graph and tabular data from result in workbench mechanical
- Difference between K-epsilon and K-omega Turbulence Model
- The solver failed with a non-zero exit code of : 2
- Time Step Size and Courant Number
- Mesh Interfaces in ANSYS FLUENT
- error: Received signal SIGSEGV
-
5268
-
3299
-
2469
-
1308
-
998
© 2023 Copyright ANSYS, Inc. All rights reserved.