-
-
August 12, 2022 at 7:01 pm
jmoss
SubscriberHow do I stop a transient simulation once a certain condition is met?  ex: Inlet pressure has reached a target value.
Thanks in advance!
-
August 15, 2022 at 1:33 pm
RK
Ansys EmployeeHello,Â
You could use the execute commands to set the conditions. Please see the users guide.Â
-
August 23, 2022 at 1:28 pm
jmoss
SubscriberThe command shown below isn't working. I want the calculation to stop once the inlet pressure decays below 0 bar at the inlet.
Is this the correct way to write the command? (Inlet zone ID = 6)
(if ( < 0 (pick-a-real "/rep/volume/volume-avg 6 , pressure n")) (set! mstop? #t))
Users guide does not explain how to write scheme programming.
Thanks for your help!
-
August 24, 2022 at 2:37 pm
Rob
Forum ModeratorI don't think there is any public Scheme documentation. My approach is to monitor the value of interest and manually stop the model once that point is reached. Otherwise you need a monitor linked to a trigger to cause the convergence criterion to be met.Â
-
August 24, 2023 at 4:11 pm
tony.karam2
SubscriberHello,
I am trying to stop the transient simulation when any of the below-described liquid fraction definitions becomes less than 0.1:
- volume-average liquid fraction (I named it "liquid_fraction_va_pcm_all")
- mass-average liquid fraction (I named it "liquid_fraction_ma_pcm_all")
How can I modify the below command to achive my target:
(if ( < 0 (pick-a-real "/rep/volume/volume-avg 6 , pressure n")) (set! mstop? #t))
-
August 25, 2023 at 7:27 pm
tony.karam2
SubscriberI guess it can be done using the following commands:
(if ( < 0.8 (pick-a-real "/rep/volume/volume-avg liquid_fraction_va_pcm_all,liquid fraction n")) (set! mstop? #t))
(if ( < 0.8 (pick-a-real "/rep/volume/mass-avg liquid_fraction_ma_pcm_all,liquid fraction n")) (set! mstop? #t))
Â
-
August 27, 2023 at 6:56 pm
tony.karam2
SubscriberHello,
I am using the below command which is supposed to stop the transient simulation when air_temp_outlet becomes greater than or equal to 926.5 K. but duing the simulation, Ansys is giving an error message statiting "invalid function". I inserted a "?" after mstop (based on what I saw on some ansys yout tube videos) but I was still getting the same error. Any help would be highly appreciated.
(if((>= (string->number (pick "/solve/report-definitions/compute air_temp_outlet")) 926.5)) (set! mstop #t))
-
August 29, 2023 at 9:25 am
Rob
Forum ModeratorI (and other Ansys staff) can't comment here as the Scheme options aren't covered in documentation and must rely on the wider community for a response.Â
-
- The topic ‘Stop simulation after given conditions are met.’ is closed to new replies.
-
5844
-
1906
-
1420
-
1305
-
1021
© 2026 Copyright ANSYS, Inc. All rights reserved.