-
-
March 4, 2024 at 10:49 pmzoelle.wongSubscriber
Hello!
I want to replicate the Orszag Tang Model in ANSYS Fluent. I have flow in a 1x1x1 m box, each side with a periodic boundary condition. However, I need to prescribe initial periodic velocity and magnetic fields.Â
Is there a way to use the GUI to prescribe a periodic field profile? Alternatively, one can use a UDF however I'm struggling with identifying where to find UDF starter code for such a problem. Thank you!
-
March 5, 2024 at 10:01 amRobForum Moderator
In Fluent you can only have one pair of periodic boundaries, others can be symmetry or slip wall if that helps.Â
-
March 6, 2024 at 4:32 pmzoelle.wongSubscriber
-
March 6, 2024 at 4:51 pmRobForum Moderator
You don't, you add a mass flow or dP for the zone and the solver will figure out what the profile is. It's in the Periodic options, button is in the central Task Page when you have the Boundary Conditions open.Â
-
March 6, 2024 at 5:05 pmzoelle.wongSubscriber
Ok. I see that you can add a constant mass flow rate or dP. I don't think adding a constant mdot or dP will result in a periodic profile which is required for the Orzag-Tang test.Â
If one cannot input a periodic profile at the peridodic BC, could one use a UDF to input a periodic magnetic and velocity field at the boundary? Is this compatible with ANSYS' backend processes?
-
March 7, 2024 at 9:32 amRobForum Moderator
The periodic works by mapping the "outlet" profile back to the "inlet" end, so you just initialise the flow and wait. Not sure about the magnetic field as you need to be careful with source terms etc for an "infinite" flow.Â
-
March 11, 2024 at 10:11 pmzoelle.wongSubscriber
Couple of follow up questions:
Per my previous post I changed the initial and boundary conditions to be the following:
I inputted the velocity profile via patching during initialization and cross compared the initialized flow field when using a INIT_DEFINE() UDF. When comparing the initialized velocity contour plots, they looked the same. I ran this as a transient simulation for roughly 50 timesteps, with each timestep being 1e-3 without a magnetic field, and the results looked ok.Â
However, when turning the MHD module on, initializing the MHD solver, and patching the expression for the magnetic field, the turbulent viscosity ratio is limted to 1e5. The contour plot for turbulent viscosity ratio is shown below. The mesh is a structured and isotropic. If FLUENT is limiting the turbulent viscosity, does this imply the mesh needs a higher refinement? Or is there something in the MHD module that was not turned on? Finally, is there a UDF macro one can use for initailizing a Force (e.g electric and magnetic) besides using the patching option for Bx, By etc?Â
Â
Thank you so much for your time!Â
Â
-
March 11, 2024 at 10:12 pmzoelle.wongSubscriber
Couple of follow up questions:
Per my previous post I changed the initial and boundary conditions to be the following:
I inputted the velocity profile via patching during initialization and cross compared the initialized flow field when using a INIT_DEFINE() UDF. When comparing the initialized velocity contour plots, they looked the same. I ran this as a transient simulation for roughly 50 timesteps, with each timestep being 1e-3 without a magnetic field, and the results looked ok.Â
However, when turning the MHD module on, initializing the MHD solver, and patching the expression for the magnetic field, the turbulent viscosity ratio is limted to 1e5. The contour plot for turbulent viscosity ratio is shown below. The mesh is a structured and isotropic. If FLUENT is limiting the turbulent viscosity, does this imply the mesh needs a higher refinement? Or is there something in the MHD module that was not turned on? Finally, is ther a UDF macro one can use for initailizing the electric and magnetic field besides using the patching option?Â
Â
Thank you so much for your time!
Â
-
March 20, 2024 at 9:18 pmzoelle.wongSubscriber
For recording purposes and future users, I figured out the diverging turbulent viscosity ratio was due to erroneous fluid transport properties.Â
After enabling the MHD Module in ANSYS, one will need to account for the magnetic permeability and electrical conductivity in the fluid properties under "create/edit materials". For the Orszag-Tang case, these values along with viscosity need to be set to 1. Density, Ratio of Specific Heats (cp/cv) and Pressure need to be set judiciously such that the fluid's speed of sound is equal to 1.0 through the relation: c^2 = gamma*P/rho = 1 where c is the speed of sound, gamma the ratio of specific heats, P the pressure, and rho the density. More information can be found here for boundary and initial conditions.
Â
Â
For the case of 1 set of periodic boundary conditions, the velocity gradient field looked like the following during initialization (when using patch utility). However, these results are still under development - note that the current results are no longer diverging.Â
-
March 20, 2024 at 9:29 pmzoelle.wongSubscriber
As a follow up to this discussion, I have a question regarding how ANSYS computes the speed of sound for a non-ideal gas. I'm hoping to compare Mach and velocity contour plots for literature, and I couldn't find from the manual how speed of sound is calculated for non-ideal gases. So in this case, speed of sound cannot be calculated through the relation. ..c = sqrt(gamma*R*T)
-
March 21, 2024 at 10:57 amRobForum Moderator
I'm not sure it is - it'll be in the Velocity reports. You may need to add in a Custom Field Function or Expression.Â
-
- The topic ‘Orszag Tang in ANSYS Fluent’ is closed to new replies.
-
766
-
407
-
264
-
201
-
162
© 2024 Copyright ANSYS, Inc. All rights reserved.