Ansys Learning Forum › Forums › Discuss Simulation › Fluids › Can you parametrize mass flow rate input in Periodic boundary conditions in Fluent? › Reply To: Can you parametrize mass flow rate input in Periodic boundary conditions in Fluent?
October 30, 2021 at 5:44 am
Madhu_Kalyan
Subscriber
I finally found a solution and I don't know whether it is correct or not. The forum admins can clarify if anything is wrong or missing but it worked for me.
After making the zones periodic, click on Named Expressions in the Setup and create a variable. In my case, it was created as "mdot" with an arbitrary value say "1" with the unit specified as "[kg s^-1]" and check the "Use as parameter" box at the bottom. It should look something like the image below.
Then give the command "define/named-expressions/compute mdot. The slashes can always be avoided if you typed enter in the place of the slash. This command is to just check whether the variable is added and compute the value you give.
The next step is to go to the "calculation activities" tab and select "Create/edit" in the "execute commands" sections. Define a command by putting this line - define/periodic-conditions/massflow-rate-specification? (pick-a-real "define/named-expressions/compute mdot" 4) . The number of iterations can be set at any number but for safe side keep it anything between 1 to 10. This means that the command is going to get executed thereby assigning the mass flow rate to the simulation every n iterations. I checked it with multiple values and it did not change the end result when it converged. I also checked the result of these simulations with the original simulation having no parameters for mass flow rate and the values checked out. The image is given below.
I tried various other methods and this is the closest I have gotten to solve it. Now I can change the mdot value in the workbench parameter and the simulations are done with correct values as intended.
The Forum coordinators are welcome to give any input to this method and I thank DrAmine for being patient and guiding me through this.
Cheers
After making the zones periodic, click on Named Expressions in the Setup and create a variable. In my case, it was created as "mdot" with an arbitrary value say "1" with the unit specified as "[kg s^-1]" and check the "Use as parameter" box at the bottom. It should look something like the image below.
Then give the command "define/named-expressions/compute mdot. The slashes can always be avoided if you typed enter in the place of the slash. This command is to just check whether the variable is added and compute the value you give.
The next step is to go to the "calculation activities" tab and select "Create/edit" in the "execute commands" sections. Define a command by putting this line - define/periodic-conditions/massflow-rate-specification? (pick-a-real "define/named-expressions/compute mdot" 4) . The number of iterations can be set at any number but for safe side keep it anything between 1 to 10. This means that the command is going to get executed thereby assigning the mass flow rate to the simulation every n iterations. I checked it with multiple values and it did not change the end result when it converged. I also checked the result of these simulations with the original simulation having no parameters for mass flow rate and the values checked out. The image is given below.
I tried various other methods and this is the closest I have gotten to solve it. Now I can change the mdot value in the workbench parameter and the simulations are done with correct values as intended.
The Forum coordinators are welcome to give any input to this method and I thank DrAmine for being patient and guiding me through this.
Cheers