-
-
September 9, 2024 at 12:54 pm
warhammer975
SubscriberHello everybody!
I'm trying to simulate air movement in 2D. There is an external fixed cylinder and an internal rotating one, as well as two channels (top and bottom) for pumping air. The geometry, shaft speed and mass flow of air that enters through the shaft are known. The question is whether it is possible to simultaneously “apply” the Rotating wall and Mass-Flow-Inlet conditions to the inner cylinder (modeled so that air flows evenly, as if from the shaft (inner cylinder))? Or are there any other ways to solve the problem?
Thank you, I will be glad for any help! -
September 9, 2024 at 1:29 pm
Federico
Ansys EmployeeHello,
simple answer is no, you cannot have a boundary simultaneously a wall and an inlet. What exactly are you looking to model here? You want the mass-flow to come in tangentially from the inner cylinder?
-
September 9, 2024 at 1:47 pm
warhammer975
SubscriberHello!
Yes, I want the mass flow to be evenly distributed across the entire surface of the inner cylinder (this cylinder must rotate at a given speed) into the gap between the cylinders.
There was an idea to pump this mass flow into the first wall cells near the inner cylinder using UDF, but so far I have not been able to do this, I need more experience in this matter.
-
-
September 10, 2024 at 8:56 am
Rob
Forum ModeratorYou also need to ask in one thread. https://innovationspace.ansys.com/forum/forums/topic/udf-for-mass-flow-inlet/
Hence my suggestion of a source term. But you may also need to add momentum if you need to account for the rotation speed in the mass coming into the domain.
-
September 10, 2024 at 12:59 pm
warhammer975
SubscriberI tried to write a function to determine the wall cells of the inner cylinder (id=5) for pumping air into them, but so far Fluent refuses to understand this mass flow...
#include "udf.h"DEFINE_EXECUTE_AT_END(find_first_near_wall_cells){Domain *domain;Thread *wall_thread;face_t f;cell_t c;Thread *adjacent_thread;real cell_dist;domain = Get_Domain(1);wall_thread = Lookup_Thread(domain, 5);begin_f_loop(f, wall_thread){c = F_C0(f, wall_thread);adjacent_thread = THREAD_T0(wall_thread);cell_dist = C_WALL_DIST(c, adjacent_thread);if (cell_dist < 0.001){Message("Found adjacent cell to wall at face: %d\n", c);}}end_f_loop(f, wall_thread)}DEFINE_ADJUST(adjust_mass_source, domain){Thread *t;cell_t c;real mass_flow = 2;real cell_dist;thread_loop_c(t, domain){begin_c_loop(c, t){cell_dist = C_WALL_DIST(c, t);if (cell_dist < 0.001){C_UDMI(c, t, 0) = mass_flow;}}end_c_loop(c, t)}}
-
-
September 10, 2024 at 1:17 pm
Rob
Forum ModeratorHow are you adding the mass?
-
September 10, 2024 at 1:40 pm
warhammer975
SubscriberI set the value ( real mass_flow = 2;) and used this cycle to set the mass flow:
begin_c_loop(c, t){cell_dist = C_WALL_DIST(c, t);if (cell_dist < 0.001){C_UDMI(c, t, 0) = mass_flow;}}end_c_loop(c, t)}}
-
-
September 10, 2024 at 3:25 pm
Rob
Forum ModeratorThat's telling a UDM a value, it's not doing anything to the DEFINE_SOURCE routine.
-
September 10, 2024 at 5:22 pm
warhammer975
SubscriberI also tried to use this function, but the result remained the same:
#include "udf.h"DEFINE_EXECUTE_AT_END(find_first_near_wall_cells){Domain *domain;Thread *wall_thread;face_t f;cell_t c;Thread *adjacent_thread;real cell_dist;/* Получаем домен */domain = Get_Domain(1);wall_thread = Lookup_Thread(domain, 5);begin_f_loop(f, wall_thread){c = F_C0(f, wall_thread);adjacent_thread = THREAD_T0(wall_thread);cell_dist = C_WALL_DIST(c, adjacent_thread);if (cell_dist < 0.001){Message("Found adjacent cell to wall at face: %d\n", c);}}end_f_loop(f, wall_thread)}DEFINE_SOURCE(mass_source, cell, thread, dS, eqn){real source;real mass_flow;real cell_dist;mass_flow = 2;cell_dist = C_WALL_DIST(cell, thread);if (cell_dist < 0.001){source = mass_flow;}else{source = 0.0;}return source;}
-
-
September 11, 2024 at 9:24 am
Rob
Forum ModeratorHow big is the near wall cell?
-
September 11, 2024 at 12:50 pm
warhammer975
Subscriber3.47e-05
-
-
September 11, 2024 at 2:14 pm
Rob
Forum ModeratorThat should pick up. I assume you have assigned the UDM memory and added the source to the cell zone?
-
September 11, 2024 at 2:41 pm
warhammer975
SubscriberI used "DEFINE_EXECUTE_AT_END" in Function Hooks and "DEFINE_SOURCE" in Fluid domain --> Source term
-
-
September 11, 2024 at 3:13 pm
Rob
Forum ModeratorHmm, not sure you need the DEFINE_EXECUTE_AT_END, but you will need to assign the wall bits in the SOURCE as not sure what is passed within the code. An easier option may be to split some cells out near the wall & then just add the source into the smaller cell zone.
-
September 11, 2024 at 5:19 pm
warhammer975
SubscriberIf it doesn’t bother you, can you tell me in more detail how to do this correctly?
-
-
September 12, 2024 at 3:22 pm
Rob
Forum ModeratorIf you create a register (under the Adapt functions), you can then split the mesh with the register. The new cell zone can be used for the source.
-
September 13, 2024 at 1:29 pm
warhammer975
SubscriberThank you very much, this helped me move forward in solving the problem. Can you help me with another question? How can I create a ring region of cells (with certain inner and outer radii) in the same way? I chose the "cylinder" shape in Adapt - Region, which should correspond to a ring for a two-dimensional problem, but I only get a rectangular region of cells
-
-
- You must be logged in to reply to this topic.
- How do I get my hands on Ansys Rocky DEM
- Non-Intersected faces found for matching interface periodic-walls
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Script Error
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Facing trouble regarding setting up boundary conditions for SOEC Modeling
- convergence issue for transonic flow
- Running ANSYS Fluent on a HPC Cluster
- Point exception in erosion calculation
-
1902
-
817
-
599
-
591
-
366
© 2025 Copyright ANSYS, Inc. All rights reserved.