-
-
November 22, 2017 at 11:23 amMin ZhangSubscriber
In the past two days, I performed a CFX simulation which called a fortran code to calculate an algebraic addition variable and a momentum source term simultaneously.Â
User Function: mom source(args)
If the Additional Variable (mom_add) is not set on the Fluid Models tab (just the momentum source is defined), the solver can finish normally. However, when mom_add is specified using the User Function mom source(args), an "solver-impi.exe" error is reported by CFX-Solver at the end of the run and no .res file is saved.Â
A similar problem is mentioned in CFD Online website, while it was unfortunately not solved.
https://www.cfd-online.com/Forums/cfx/126242-user-fortran-stack-overflow-problem.html
This situation occurs only if the addition variable is activated. So it is not caused by parallel setup (Intel MPI).Â
As I know relatively little about Fortran, I just thought this error is due to the USER_GETVAR routine which is applied to calculate velocity gradient tensor. Then i reviewed "USER CEL Example 2" in CFX Manual and embedded that into my own simulation. The type of phi2 (declared using transport equation in the Example) is changed to an algebraic variable, and phi2 is calculated using the same 'AdVarSource.F' code (offered in
examplesUserFortran).
phi2 can be calculated and no error occurs.
This puzzled me, so i checked my own code and deleted some unnecessary local variables. Finally and fortunately, the solver ran well and finished normally. Therefore, if the simulation is complex and large, trying to define variables in Fortran codes as little as possible.
PS: some spelling errors cannot be recognized when compile the code using cfx5mkext script in the command line, and the solver just stop without offering enough information. So, just be careful.
I spent two days to solve this problem and hope this information can be helpful for others.
Â
-
November 24, 2017 at 12:39 amJimmyhanSubscriber
Your suggestion really helps. by the way, it is very important in my mass transfer simulation when I set source.
-
- The topic ‘A tip for CFX USER Fortran’ is closed to new replies.
- Non-Intersected faces found for matching interface periodic-walls
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Fluent fails with Intel MPI protocol on 2 nodes
- Cyclone (Stairmand) simulation using RSM
- error udf
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Script Error
- Facing trouble regarding setting up boundary conditions for SOEC Modeling
- UDF, Fluent: Access count of iterations for “Steady Statistics”
-
1406
-
599
-
591
-
555
-
366
© 2025 Copyright ANSYS, Inc. All rights reserved.