-
-
January 23, 2024 at 6:40 amMyunghyun ShinSubscriber
Hello. I am a mechanical engineering student studying Ansys subroutines.
I am writing to seek assistance as I am encountering issues while constructing an ideal gas Equation of State (EOS) using the subroutine code provided below.
The section for updating the internal energy (EE) has been coded based on the reference from the theory manual, as depicted in the image below. Additionally, the pressure (PP) has been calculated using the updated internal energy (EE) in the code.
The gas density has been set to be the same as air (0.001225 g/cm³), and the initial internal energy has been input as 2.068e5 J/kg, based on atmospheric pressure as the initial condition.
The analysis conditions were set using the Euler solver, as depicted in the image below. The analysis was conducted using a single cell for a total duration of 1 ms, under constant volume conditions.
The analysis results are as follows.
According to the ideal gas EOS equation provided in the theory manual, the expected pressure was calculated to be (1.4-1.0) * 0.001225 [g/cm3] * 2.068e5 [J/kg] = 101.332 kPa. However, the actual analysis result yielded 340.31 kPa.
Â
Even when the gas density was doubled (0.002450 g/cm³), as shown in the image above, the analysis still resulted in 340.31 kPa.
Â
Is there any part in the provided code that is incorrect, or is there a misunderstanding on our part?
Â
Thanks and best regards,
Myunghyun Shin -
January 23, 2024 at 9:40 pmChris QuanAnsys Employee
You can use Debug mode to put breakpoints in your user subroutine and make sure EE,PP, and SoundSpeed are calculated correctly.
If you have entered difference density but they all gave the same pressure, you need to check your user subroutine to make sure the results calculated by the user subroutine have been returned to the main code properly from the user subroutine.
Â
-
January 24, 2024 at 6:52 amMyunghyun ShinSubscriber
Thanks for your kind response!
Â
I have set breakpoints and proceeded with debugging as shown in the screenshot as you recommended.
Â
In the first cycle, it has been confirmed that calculations for EE, PP and SOUND have been performed correctly up to line +191.
 However, an issue has been identified in the next cycle where P0 is not being updated to the previous cycle's PP.
To address the aforementioned issue, how should the code be modified?
Â
Thanks and best regards,
Myunghyun Shin
-
-
- The topic ‘Autodyn subroutine issue : Ideal gas EOS’ is closed to new replies.
- LS-DYNA Installation Issues with Student Workbench 2024 R2
- LS-Dyna CESE SMP d vs MPP d solver
- CESE solver – Ignition mechanism
- Cross-coupled stiffness elements in LS-DYNA
- About combine different unconnected body into one part
- Mathematical model generation stuck at 10%
- CONTROL_REFERENCE_CONFIGURATION
- Tiebreak using Segment set for contact b/w 20 noded Hexahedral elements
- shape memory alloy material in LS-DYNA
- CESE combustion model
-
1191
-
513
-
488
-
225
-
209
© 2024 Copyright ANSYS, Inc. All rights reserved.