August 22, 2023 at 11:13 amJoeSubscriber
I would like to specify the outlet boundary pressure profile using a text file for each time step where each text file specifies the pressure at each cell.
I have written the attached UDF but it gives the incorrect answer on initialization (though it does compile and load OK). It definitely acknowledges the values in the text file, as they change on the initialization when I change the text file. However, the values it reads are of no obvious relationship to the values in the text file (and of significantly lower magnitude). Once I run the simulation, I get a SIGSEGV mpt accept error. I think there are issues with my UDF but I'm new to them so I would appreciate any advice (I know you can't directly edit).
August 22, 2023 at 3:46 pmRobAnsys Employee
Settting a single pressure value with time wouldn't need the files. Setting a boundary using a file would need you to loop over and interpolate the contents of the file to the boundary: it's not as simple as giving the file x, y, z & pressure.
What are you trying to mimic?
August 22, 2023 at 4:15 pmJoeSubscriber
Sorry for the confusion. I would like to specify the full pressure profile on the boundary, not just a single value.
Preferably, I want to try and avoid doing interpolation inside the solver to reduce the compute time (and so that I'm sure of the interpolation method). I'm happy to do my own interpolation so that the file I read in will have the exact data for each cell. Then I hope to organise the data in such a way that it is in the same order as the cells are stored in Fluent.
August 23, 2023 at 7:58 amRobAnsys Employee
You may be better off using profiles and a journal to update the profile & boundary condition every some time steps. Much less complex and the solver will interpolate the profile file automatically.
August 23, 2023 at 8:59 amJoeSubscriber
Would this not be extremely slow since I need to update the profile at every time step?
August 23, 2023 at 10:56 amRobAnsys Employee
If you need to update the boundary that frequently then you won't be any better off using a UDF. Does the boundary value change that often to need updating at the resolved flow timescale?
August 23, 2023 at 11:05 amJoeSubscriber
Unfortunately yes. I'm trying to simulate a spinning acoustic mode at the outlet so the whole profile must vary with each timestep.
August 23, 2023 at 1:07 pmRobAnsys Employee
And you want to update the profile every micro second?
August 23, 2023 at 1:10 pmJoeSubscriber
Yes - the time step size is in the region of 1e-5 seconds, and the profile changes at each time step.
August 23, 2023 at 1:23 pmRobAnsys Employee
I'm not convinced that's going to work well with the solver in the event of the revised boundary not matching what the solver thinks should be going on: ie you could create a feedback instability. UDF or profiles will work, but you may find it easier to model the next bit too.
- You must be logged in to reply to this topic.
Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.
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.
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.
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Difference between K-epsilon and K-omega Turbulence Model
- Getting graph and tabular data from result in workbench mechanical
- The solver failed with a non-zero exit code of : 2
- Suppress Fluent to open with GUI while performing in journal file
- Mesh Interfaces in ANSYS FLUENT
- Time Step Size and Courant Number
- error: Received signal SIGSEGV
© 2023 Copyright ANSYS, Inc. All rights reserved.