-
-
November 20, 2018 at 12:55 pm
Max4
SubscriberHi,
I have write a Scheme file (see below) to change the boundary condition of inlet and outlet depending on time.
(iif (> (rpgetvar' flow-time) 0.033) (
(ti-menu-load-string "define/boundary-conditions/zone-type 5 wall")
(ti-menu-load-string "define/boundary-conditions/zone-type 6 pressure-outlet ")
(ti-menu-load-string "define/boundary-conditions pressure-outlet 6 yes no 0 no yes yes no no")
(iif (> (rpgetvar' flow-time) 0.066) (
(ti-menu-load-string "define/boundary-conditions/zone-type 5 mass-flow-inlet ")
(ti-menu-load-string "define/boundary-conditions mass-flow-inlet 5 yes yes no 0.01 no 0 no yes")
(ti-menu-load-string "define/boundary-conditions/zone-type 6 wall")
The problem is, when I try to read this file, I obtain the following error:
Error: eof inside list
Error Object: (if (> current_time 0.066) ((ti-menu-load-string "define/boundary-conditions/zone-type 6 wall")))
I have checked the folder name, direction, file name and there isn´t any problem with this.
Should I define the current time ? If ys, how? The condition if (> current_time 0.033) is true at the same time as if (> current_time 0.066) . Is it a problem ?
Regards,
Maxime
-
November 20, 2018 at 2:01 pm
Karthik R
AdministratorHello,
You do not have to define these. They are macros already present in Fluent. Also, try rpgetvar 'flowtime and not rpgetvar' flowtime. However, I do not think there is a different between using this or current_time (someone please correct me if I am wrong).
Try to use the loop such that only one if statement is true. Based on your algorithm, two if statements can be true if t > 0.066. If I understand if condition, you need to have your algorithm such that only one statement is applicable for any given time.
I hope this helps.
Best Regards,
Karthik
-
November 20, 2018 at 2:32 pm
Max4
SubscriberHello,
Thank you for your answer. I have just found this about the If-Statement for Scheme file:
My Scheme is as follow:
(if (> (rpgetvar 'flow-time) 0.033)
(ti-menu-load-string "define/boundary-conditions/zone-type 5 wall")
(ti-menu-load-string "define/boundary-conditions/zone-type 6 pressure-outlet ")
(ti-menu-load-string "define/boundary-conditions pressure-outlet 6 yes no 0 no yes yes no no")
)
When I read this file I have this error, because I have 3 arguments instead of 2. It works when I just use the below scheme:
(if (> (rpgetvar 'flow-time) 0.033)
(ti-menu-load-string "define/boundary-conditions/zone-type 5 wall")
May I use two If statements for the condition t > 0.033 ?
Error: if syntax: Too many arguments
Regards,
Maxime
-
November 20, 2018 at 2:36 pm
Karthik R
AdministratorHi,
Can you try the following?
(if (.....)
(begin
(ti-menu-.....(.....))
(ti-menu-......(.....))
(ti-menu-......(....))
)
)
Please let me know how this works.
Thanks.
Best,
Karthik
-
November 20, 2018 at 2:58 pm
Max4
SubscriberI´ve done as you proposed (see below) and the reading of the .scm works. Thank you.
(if (> (rpgetvar 'flow-time) 0.033)
(
(ti-menu-load-string "define/boundary-conditions/zone-type 5 wall")
(ti-menu-load-string "define/boundary-conditions/zone-type 6 pressure-outlet ")
(ti-menu-load-string "define/boundary-conditions pressure-outlet 6 yes no 0 no yes yes no no")
 
)
I read this for loading the .scm in order to use it, but I can´t find it.
Regards,
Maxime
-
November 20, 2018 at 3:04 pm
-
November 20, 2018 at 3:15 pm
DrAmine
Ansys EmployeeNo you need to read the scheme file as /file read-journal or just create procedures out of the scheme files and then just read the scheme file one and execute the procedure by just (procedure-name).
-
November 20, 2018 at 4:21 pm
Max4
SubscriberI have read the .scm with the TUI-Commands: /file read-journal xxx.scm and then I load it in Calculation Activities -> Execute Commands -> (load " xxx.scm") for each Time-Step.
Thank you all for your answers.
Regards,
Maxime
-
November 20, 2018 at 4:23 pm
DrAmine
Ansys EmployeePlease set then this topic as solved and mark the answer which helped to resolve the question. Thanks.
-
November 21, 2018 at 10:07 am
Max4
SubscriberBelow, the Scheme file which I use to solve my problem with the If-Statement. If 'flow-time is 0.067 (delta t=0.001s in my case), then it calls only actions below ((> (rpgetvar 'flow-time) 0.066) and not actions from the following condition ((> (rpgetvar 'flow-time) 0.033).
(cond
((> (rpgetvar 'flow-time) 0.066)
(ti-menu-load-string "define/boundary-conditions/zone-type 5 velocity-inlet ")
(ti-menu-load-string "define/boundary-conditions velocity-inlet 5 no no yes yes no 1 no 0")
(ti-menu-load-string "define/boundary-conditions/zone-type 6 wall")
)
((> (rpgetvar 'flow-time) 0.033)
(ti-menu-load-string "define/boundary-conditions/zone-type 5 wall")
(ti-menu-load-string "define/boundary-conditions/zone-type 6 pressure-outlet ")
(ti-menu-load-string "define/boundary-conditions pressure-outlet 6 yes no 0 no yes yes no no")
)
)
Then I read this file from the TUI-Commands (/file read-journal xxx.scm) and load it in the Execute Commands for each-time-step ( load "xxx.scm" ).
Regards,
Maxime
-
March 15, 2021 at 10:58 am
Vanesa
SubscriberHello,I am trying to simulate time varying boundary condition where after some time one of my wall should be changed as mass flow inlet with a certain amount of mass flow rate value. I went through the discussions on this forum and many other internet resources and even fluent documentation. Implementing UDF or using scheme file are the options one can use to define this time varying boundary condition was my conclusion. UDF needs strong programming skills and scheme documentation is rarely available.nI want to try scheme file for my simulation. I want to know how can we input other details of my changing boundary condition in the scheme file. Suppose my scheme file is:nn(condn ((> (rpgetvar 'flow-time) 2.0)n (ti-menu-load-string define/boundary-conditions/zone-type 6 wall)n (ti-menu-load-string define/boundary-conditions wall 6 no no yes yes no 1 no 0)n (ti-menu-load-string define/boundary-conditions/zone-type 6 mass flow-inlet)n )n)n So now for this wall I want it to change to mass flow inlet after 2 secs in my simulation and I want to specify its details within this scheme file befoe the run (flow direction specification method/value of mass flow rate, etc.).nHow can I do it?nPlease help.nThank you.n -
March 15, 2021 at 12:03 pm
Rob
Ansys EmployeeI'd also have a look at the Case Modification options, you may find you can trigger the mass flow bc at 2s using those. nRe the commands, click into the TUI panel and hit Enter. Typing in a menu label and hitting enter takes you to the sub menu, using q (Q) takes you back up a level. n
-
- You must be logged in to reply to this topic.

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
-
2656
-
2120
-
1349
-
1118
-
461
© 2023 Copyright ANSYS, Inc. All rights reserved.