-
-
August 29, 2023 at 12:00 pm
Jacob Morrissey
SubscriberHi All,
I am working on a project where i am designing, analsying by means of Ansys Fluent, and machining a beta stirling enigne.
Can anybody help me write the UDF code and set up the dynamic mesh for the cylinder.
A diagram is shown below :
There is no inlet and outlet as the air (working fluid) is contained within the cylinder.
There are two moving variables the piston and displacer.
There is a temperature difference between the compression and expansion zone (300k-600k roughly).
If anyone has a free hour to jump on call or anything, it would be greatly appreciated :)
email : Editted - Rob. Please keep discussions on here so all can learn
-
August 29, 2023 at 12:34 pm
Rob
Ansys EmployeeHave a look at the 6DOF (1DOF) options and layering (remeshing) in the documentation and Help. Don't forget to add some resistance based on the flywheel etc.
-
August 29, 2023 at 1:12 pm
-
August 29, 2023 at 2:15 pm
Rob
Ansys EmployeeThat looks to be the surface temperature, nothing to do with mesh motion. Click on Help in the Fluent Solver and have a look at the UDF (Customisation) Manual.
-
August 29, 2023 at 3:19 pm
-
August 29, 2023 at 3:24 pm
Rob
Ansys EmployeeAre you driving the piston to alter the flow or using the flow to drive the piston? The above looks to be the former.
-
August 29, 2023 at 3:32 pm
Jacob Morrissey
SubscriberThe piston is what drives both the power piston and the displacer. Hence the crank pushes the power piston into the cylinder.
Once the flywheel turns the displacer moves to the heated zone and the air is compressed by a heat source. The displacer then shuttles the air back to the cooler zone.
Do i need to specify the temperatures of the cold side and hot side or can this be done within ansys.
This is seeming to be challenging
-
August 29, 2023 at 3:45 pm
Rob
Ansys EmployeeYou'd need to set the outside wall temperatures and any external effects including valves/bleed systems. The motion (in reality) is fluid/temperature driven with some assistance from the flywheel, in the CFD model we can do what we want (within some physics limits). And, yes, it's somewhat tricky!
How much CFD have you covered on your course?
-
August 29, 2023 at 3:53 pm
Jacob Morrissey
SubscriberI did a course on Aerfoils at differing AOA.
I'm not sure whether i know enough to do this level of complexity of CFD.
Is there any static problems which i could use ? (which do not use UDF coding)
I was thinking one could be heat exchange through the cylinder (not including the piston, diplacer or shaft). But seeing how the heat conducts with varying materials.
Any other ideas would be useful :)
-
August 30, 2023 at 8:06 am
Rob
Ansys EmployeeThe classic aerofoil example. I never had to do that at Uni as cartesian hex meshes tended not to capture the curves very well....
What are you trying to prove with the model? Ie is it an MEng project or something else? How is heat added to the outer casing? The two pistons can be moved at (time varying) fixed speeds which would take the incylinder workflow (layering remeshing) with a profile for the piston speed. I would get colleagues to do some of this as I cover mutliphase and some of the weird stuff as a specialist but tend to avoid any moving or deforming mesh.
-
August 30, 2023 at 10:41 am
Jacob Morrissey
SubscriberHi rob,
It is for my degree Bsc , so a little less complex as the MEng.
The heat is added to underneath the cylinder via a bunsen burner.
Like shown above.
Okie dokie, that makes sense. Would you have anyone who can help me with this ?
I do believe simplfying it would be focusing soley on the heat exchange through the cylinder and how the hot air moves to the col region (not including pistons or diplacers).
Any help with this stuff is greatly appreciated, so thank you :)
-
August 30, 2023 at 11:39 am
Rob
Ansys EmployeeOn the Forum we (staff) are limited to public domain knowledge and documentation. Assuming you can work out the various thermal boundary conditions you're then going to need some way to model the piston motion, the remeshing part would be layering, but you'd then need to figure out the solid-solid nonconformals etc. The rate of motion can be preset, but may then result in an odd pressure field or based on the pressure which would need a UDF to account for assistance and resistance of the piston(s) and flywheel. For a BSc this may be a little ambitious.
The incylinder tutorials would give you most of the meshing requirements, but you'd need to model the piston as a solid for heat transfer. The 6DOF may be enough to get you going with the 1DOF part that you need.
It's very definitely not a two-three week project, and run times could be significant.
-
August 30, 2023 at 11:48 am
Jacob Morrissey
SubscriberThank you for the information, it does seem to be ambitious for what the scope is. I'm already designing the system, studying it through FEA and then machining it, so Ansys included would be a lot of work.
I'm getting an early start though, as the project submition is not until next March so there is plenty of time to figure things out.
To model the piston motion, this would be through UDF ? It's modelled on solidworks and the piston stroke is correct.
If this is not feesible I'm going to use a simpler method like the one shown in the report below :
ARFMTSV64_N1_P126_134.pdf (akademiabaru.com)
Is this a lot easier ?
It would not require UDF or dynamic meshing, as the problem is static.
Many thanks,
-
August 30, 2023 at 12:42 pm
Rob
Ansys EmployeeI'm not allowed to follow links as it's one of the rules imposed on staff to keep us on the right side of the Export Law criterion. We may make an exception for Reseachgate, but that's at our discretion and very topic dependent.
Do you have to do CFD? Just wondering if modelling a stuck piston to see if the temperature was sufficient to burst the cylinder would be a good project? That would be Mechanical, with fluid elements to see how much pressure could be generated given the heat source. Really not my field - I relearnt my structural mechanics over a couple of beers with a biro lid being the example piece: business travel isn't very exciting!
I'm not sure on the motion, check the incylinder examples as I think you can use profiles now: I did a little bit of moving mesh when it was originally brought into the unstructured version of Fluent but it's changed a bit in the last 20 years....
-
August 30, 2023 at 12:55 pm
Jacob Morrissey
SubscriberThe cylinder is made from 303 Steel, so the cylinder would not burst. The top temperature would not surpass 800K.
But a heat comparison between different grades of steel, aluminium etc may be viable.
This is a static problem and would use no motion.
I have ansys yes. My project will remain the same I just want to use some ansys to analyse the cylinder.
I wonder if it be a better option to CFD at two different points (Statically) - where the displacer is in the heated region, and then when the piston is in the cold region, just to look at pressure variations. This may simplify it.
-
August 30, 2023 at 3:41 pm
Rob
Ansys EmployeeSo, no preference for Mechanical or CFD? It's all "Ansys" :)
Static models will need some care too. The steady solution is the equilibrium point, ie at infinite time. In Fluent if you set a temperature you risk that being uniform, with a fixed heat flux you could hit the 1K or 5000K limiters. Hence all the questions about defining the exact condition to model.
Using the tools is fairly simple (with some of the more complex models being a little harder). Thinking what to model & how may be harder. Much the same with machining: should I use a lathe or really big drill bit for the cylinder?
-
August 30, 2023 at 3:53 pm
Jacob Morrissey
SubscriberFEA is mechanical and will be done in solidworks and CFD will be done in Ansys, i know ansys can do the both.
But yes, i understand your points, thank you for all the help.
-
- 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.

Ansys Blog
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
-
7742
-
4502
-
2961
-
1449
-
1322
© 2023 Copyright ANSYS, Inc. All rights reserved.