-
-
April 28, 2023 at 1:07 pm
Pieter Verboven
SubscriberI am currently working on modeling a multiphase flow problem with particle tracking using ANSYS. I used a fortran subroutine for particle/water droplet injection methods or particle injection region. This fortran code is used to define/determine the particle/water droplet position/location and velocity by random generating them. This Fortran code was previously used by our college 12 years ago for similar simulations without any issues. However, when I tried to use the same code in my current simulation, the CFX solver crashes after either 40 iterations or at the 4th iteration of particle calculation with error code 194.
I have identified that the error is being caused by a specific part of the Fortran code, which is shown below. The simulation run without any problem when I modify the P value which used to calculate R2 as: P=(ztemp/xtemp*3.14) or by dividing P by 3 and using a higher number or by multiplying R2 by 1.5 or a higher number while keeping the same P as it is original code. This R2 value used as to determine when to injection the particle as shown in the below fortran code. However, these modifications result in a rectangular spray pattern or flow rate distribution on the ground, whereas the desired shape should be spherical. Therefore, I need to keep the P or R2 value as it is. Could you please help me to resolve this issue? Why is the Fortran code, which previously worked 12 years ago, not working for the current simulation? Could this be due to the ANSYS version I am using (Ansys 2023R1), or do I need to modernize the Fortran code to the Fortran 90 or 95 version?
Thank you for your help in advance.
-
May 2, 2023 at 11:25 pm
Surya Deb
Ansys EmployeeHello,
Can you check if xtemp is somehow getting assigned a value of zero? If so, then division by zero will cause a crash. You can try adding a very small number in denominator like ztemp/(xtemp+1e-20).
Regards,
SD
-
May 3, 2023 at 10:17 am
Pieter Verboven
SubscriberThank you for your response and suggestion. I have checked and verified that the value of xtemp is not being assigned zero at any point in the code. I also tried by adding smaller number in the denominator. Therefore, division by zero is not the issue here.
As mentioned, I have found that modifying the value of P or R2 resolves the crashing issue, but it results in a rectangular spray pattern rather than the desired spherical shape. I am hoping to find a solution that allows me to keep the original values of P and R2 while achieving the desired spherical shape. I was wondering if it might be possible to obtain a user routine for a flat fan nozzle in order to define injection region?
If you have any other suggestions or insights, please let me know.
Best regards
-
-
May 4, 2023 at 12:05 am
rfblumen
Ansys EmployeeSince it's not possible to debug the code while it's running in the CFX solver, I would add write statements to either write to a file or to the console. I would monitor the expressions in question to see what is happening near and when the solver crashes. This will give a better idea of what's happening in the code.
-
- 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
-
5454
-
3417
-
2473
-
1310
-
1022
© 2023 Copyright ANSYS, Inc. All rights reserved.