-
-
February 28, 2023 at 10:02 am
Qingshan Liu
SubscriberI am working on the problem of specifying anisotropic electric conductivity to the gas diffusion layer of a fuel cell, using the PEM Fuel Cell module that comes with Fluent. Since the module treats the electric-potential as UDS-0, the DEFINE_ANISOTROPIC_DIFFUSIVITY macro is required to specify the corresponding electric conductivity. The source code gives the appropriate modification areas and hints, and I made the changes in the appropriate locations in the source code. After recompiling the source code, the software did not prompt for errors, and the following is the complete code for that section. However, after I hook the compiled UDF to the GDL material and run it, the console pops up with the error "Error at Node X(0-7): No anisotropic UDS diffusivity option has been selected for difflayer " error report, and the software does not run. Here is how I hooked the UDF. I don't know why this error message appears, does this mean that the UDF was not hooked successfully? After I modified this part of the code and compiled it as a separate UDF file, the same error is not reported by the software, but the same error occurs after mounting and running. Please help me!😢
-
February 28, 2023 at 11:45 am
Rob
Ansys EmployeeDid you set the other 4 UDS diffusivuty values?
-
March 1, 2023 at 2:31 am
-
-
March 1, 2023 at 9:56 am
Rob
Ansys EmployeeUser defined as what? Shouldn't the UDF label show up? Put a constant in for UDS1-4 and see if it works.
-
March 1, 2023 at 10:22 am
-
-
March 1, 2023 at 11:29 am
Rob
Ansys EmployeeBut it runs, so that's pointing at the UDF setting.
Re the returned value. It's fine here, I've checked with two scalars on a test case. How's the mesh resolution in that cell zone? What values are set for scalar bc's?
-
March 1, 2023 at 11:51 am
Qingshan Liu
SubscriberI am using catalyst to test if assigning diffusivity to UDS works, and for difflayer it still doesn't work after hooking UDF. Can you tell me why the value of protonic potential diffusivity calculated with Report (anode and cathode catalyst do not agree and are not equal to 5) is not equal to the value (constant value 5) I specified for UDS-1 (protonic potential)? I started the modeling from modeling, drew the mesh, set the case, and the result is still the same as before, which means that it is not a problem with the mesh. The mesh quality is as follows.
Mesh Quality:
Minimum Orthogonal Quality = 7.07226e-01 cell 1084 on zone 24 (ID: 183000 on partition: 2) at location ( 5.53174e-04, 3.10227e-03, 9.95000e-03)
Maximum Aspect Ratio = 8.77089e+01 cell 1960 on zone 29 (ID: 86124 on partition: 2) at location ( 1.50000e-04, 1.75887e-03, 7.65000e-03)
My boundary condition settings are the same as those given in the module calculation, as shown below.
-
-
March 1, 2023 at 12:11 pm
Rob
Ansys EmployeeWhat else is set in those cell zones?
-
March 1, 2023 at 12:15 pm
Qingshan Liu
SubscriberI can't quite understand what you mean, can you explain? And what should I do next? Thanks!😀
-
-
March 1, 2023 at 1:49 pm
Rob
Ansys EmployeeAny other models? Ie where did the current density come from, any porous media etc. Not sure how to fix without a lot more digging: we (staff) are not able to do that via the Community either.
Usual trick is to turn stuff off and test on a simple model. So, try your UDF out on a pipe or similar geometry. Then make it more complicated.
-
March 2, 2023 at 1:41 am
Qingshan Liu
SubscriberOk, I will try it as you suggested to test if the PEM Fuel Cell module is causing the problem. Thanks!😀
-
March 2, 2023 at 3:03 am
Qingshan Liu
SubscriberWith the assistance of my friend and after my testing, I found that this situation of the diffusivity calculated by Report not being equal to the specified value after assigning a constant value to UDS-1 still exists under different computers, different software versions and different cases. I think this is a bug in the software itself.😱
-
-
March 2, 2023 at 7:23 am
Qingshan Liu
SubscriberAfter my further testing, the results calculated by Report do not change even when I assign all UDS to the constant value 0. This means that assigning other values to the UDS or hooking the UDF does not work under the PEM Fuel Cell module, please tell me where I should change to have a real impact on the UDS?😰
-
March 2, 2023 at 11:13 am
Rob
Ansys EmployeeJust read up on the model, I think I have an answer, if not a colleague (who uses the PEMFC module) is checking.
https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v231/en/flu_ug/flu_pemfc_chap_pem_using.html
Click on Help in Fluent, then paste the link into the browser, you want the limitations section.
-
March 2, 2023 at 11:15 am
-
March 2, 2023 at 11:27 am
Qingshan Liu
SubscriberI saw the limitations stated in the document and I was wondering if the anisotropic of the electric and protonic potential is also considered in the species diffusivity? I thought the species diffusivity refers to the diffusivity of gases and liquids.
Note the following limitation when using the PEMFC model:
• The anisotropic species diffusivity option is not compatible with the PEMFC model. -
March 3, 2023 at 11:58 am
Rob
Ansys EmployeeFrom our expert.
UDS-0 is an allocated electric potential. It cannot be different in 3 different directions. Having said this, the current density can. The current is the product of electric conductivity and the potential gradient in any given direction.
The Theory Guide has the equations in tensor form.
-
March 6, 2023 at 2:11 am
Qingshan Liu
SubscriberThank you for your answer, but I still have a question. The following code is from the source code of the ANSYS Fluent PEM Fuel Cell module, which states that users can specify anisotropic electric conductivity for UDS-0, but I am unable to run the program after specifying it as required. Can you give me a sample code? So that I can specify the anisotropic conductivity and run the software.
-
-
March 8, 2023 at 2:43 pm
Rob
Ansys EmployeeCan you try with a different value in the UDS? Say, 2, 3, 4, 5 for each UDS respectively. It's to test which values the solver thinks it's using.
-
March 13, 2023 at 7:41 am
Qingshan Liu
SubscriberSorry for the late reply, please see the message I replied to earlier, I have tested giving the UDS a constant value to test but found that assigning any constant value to UDS-1 for the catalyst layer is invalid, maybe a bug in the PEM Fuel Cell module?😥
-
-
March 13, 2023 at 10:11 am
Rob
Ansys EmployeePossibly, a colleague is watching the thread, he's too familiar with the module to be safe to post: we can only discuss what's in the documentaiton or that is "common knowledge". I'll remind him to check. It may be limited to the anisotropic part: I don't use that module so am not able to quickly check.
-
March 14, 2023 at 12:01 pm
Qingshan Liu
SubscriberThanks for your help and if you have any suggestions, please do not hesitate to contact me.😁
-
-
- 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
- The solver failed with a non-zero exit code of : 2
- Difference between K-epsilon and K-omega Turbulence Model
- Time Step Size and Courant Number
- Mesh Interfaces in ANSYS FLUENT
- error in cfd post
-
3930
-
2649
-
1865
-
1272
-
610
© 2023 Copyright ANSYS, Inc. All rights reserved.