Ansys Learning Forum › Forums › Discuss Simulation › Fluids › Reversed flows after switching inlet boundary conditions › Reply To: Reversed flows after switching inlet boundary conditions
October 14, 2024 at 5:25 pm
thaison.tran
Subscriber
Â
Â
Thanks Rob for your prompt response.
Here I am referring the tank pressure as inlet pressure (gauge total pressure), which is set using the following scheme script.
Â
(define (change-inlet-boundary-to-pressure)
  (if (> (%rpgetvar 'flow-time) 60)Â
    (begin
      ;; Set the boundary from mass-flow-inlet to pressure-inlet
      (ti-menu-load-string "define/boundary-conditions/zone-type inlet pressure-inlet")
      Â
      ;; Set the pressure inlet conditions: pressure = 45000 Pa (0.45 bar), temperature = 77 K
      (ti-menu-load-string "define/boundary-conditions/pressure-inlet inlet yes no 45000 no 0 no 77 no yes")
      Â
      ;; Output a message confirming the boundary change
      (display "Boundary condition switched to pressure inlet with pressure 45000 Pa and temperature 77 K.\n")
    )
  )
)
Â
I created a report file to monitor gauge total pressure at the inlet so that I can adjust the set pressure in the scheme script accordingly. As for hydrogen properties, I extracted it from the REFPROP library available in Ansys into a RGP table and hook it up to the material section of hydrogen in Fluent. Â
Â
Â
Â