|
[Sponsors] |
UDF for object oscillating in direction of flow |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 20, 2015, 06:31 |
UDF for object oscillating in direction of flow
|
#1 |
New Member
Terry
Join Date: Aug 2015
Posts: 21
Rep Power: 11 |
Hi all,
I am currently taking up a simulation project. I was tasked to make use of ANSYS Fluent to simulate objects that oscillates in the direction of flow. I have attached an image below to illustrate my project requirements. From what I understand after reading through guides and forums, dynamic meshing is probably required and UDFs have to be used. However, I am very new to programming and ANSYS FLUENT even though I have worked through several tutorials online. Thus, would it be possible for anyone to share with me UDF codes or any guides for me to achieve my project requirement? Thank you for your time reading this. |
|
August 20, 2015, 07:34 |
|
#2 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Have a read of the Dynamic Mesh section of the UDF manual. You'll need to use the DEFINE_GRID_MOTION macro to specify the movement of your oscillating body. Use either only a smoothing dynamic mesh method or include the remeshing method as well if there's significant motion and the surrounding cells can't absorb this motion without sacrificing element quality.
|
|
August 24, 2015, 09:09 |
|
#3 |
New Member
Terry
Join Date: Aug 2015
Posts: 21
Rep Power: 11 |
Oh yea, is there any way I can let the object move without UDF? In other words, can i just rely on dynamic mesh methods?
Thank you! |
|
August 24, 2015, 09:39 |
|
#4 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
The UDF (DEFINE_GRID_MOTION) is only to define the movement of the oscillating body (should be quite a straightforward code where all nodes move in sync). The dynamic mesh is used for modifying the mesh (there's no default setting for oscillatory motions like your example -- there's a setting for pistons though).
|
|
August 24, 2015, 09:48 |
|
#5 |
New Member
Terry
Join Date: Aug 2015
Posts: 21
Rep Power: 11 |
Oh this is because I am facing problems with UDF such as the error attached in this reply.
I have searched this forum and even googled and I am still unable to find any solutions to this |
|
August 24, 2015, 10:15 |
|
#6 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
That error appears to be a compilation error. Have you managed to compile UDFs other than those for the dynamic mesh model?
|
|
August 24, 2015, 11:51 |
|
#7 |
New Member
Terry
Join Date: Aug 2015
Posts: 21
Rep Power: 11 |
oh I haven't tried others. I would probably try to figure out the cross platform compilation.
Meanwhile, would it be possible if i consult you regarding UDF Coding for lateral movements. I see that there are DEFINE_GRID_MOTION and DEFINE_CG_MOTION. Which one would be more useful for lateral movement? Am I correct to say that Dynamic Mesh has to be used in conjunction with UDFs to achieve my objective? As for the oscillating motion(i.e foward and backwards) how do I code it to make it repeat the movement? Thank you so much, sorry for asking you so many questions. I am really new to ANSYS Fluent and Coding. Thanks a million! |
|
August 24, 2015, 19:57 |
|
#8 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Both UDFs should work for oscillatory motion of a body (I don't believe you could accomplish it without a UDF). I recommend DEFINE_CG_MOTION because you specify the velocity which is uniform across the body surface. The DEFINE_GRID_MOTION would work fine as well (but you'd specify the node displacements).
|
|
August 26, 2015, 01:40 |
|
#9 |
New Member
Terry
Join Date: Aug 2015
Posts: 21
Rep Power: 11 |
Hello 'e'
I have finally allowed my airfoil to oscillate front and back. However, I am still unable to run the CFD simulation. It seems that my steps are incomplete. Do I have to define the deforming mesh by UDF or anything? I have received an error when I preview mesh motion, and when I display zone motion, I am unable to see any mesh, only an oscillating airfoil. Would it be possible for you let me know what am I doing wrong or what have I missed? So sorry for asking so many questions, I am really new to Fluent. Thanks a lot for your help! |
|
August 26, 2015, 09:00 |
|
#10 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
What is the UDF you are using and what settings have you used? The negative volume error often occurs when you've moved the boundary too far in one time step (beyond one cell height -- a fixed upper barrier of the dynamic mesh); the solution is to reduce the time step.
|
|
August 27, 2015, 09:18 |
|
#11 |
New Member
Terry
Join Date: Aug 2015
Posts: 21
Rep Power: 11 |
Hi 'e', I have PMed you the UDF and images... Thanks for your help once again!
|
|
September 15, 2015, 16:07 |
|
#12 |
New Member
Ahmed Jalal
Join Date: Mar 2015
Posts: 22
Rep Power: 11 |
tsaget,
Were you able to solve your problem? I believe reducing the time step just delays the error of "negative volume". Did you only link the DEFINE_CG_MOTION to your body? Thanks |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF for Mass Flow at the Outlet: ERROR ACCESS VIOLATION | I-mech | Fluent UDF and Scheme Programming | 1 | May 23, 2014 13:37 |
UDF problems with porous flow | Nicolastheterminator | Fluent UDF and Scheme Programming | 0 | April 8, 2014 10:12 |
UDF of flow over oscillating cylinder 2D case | imharoon1 | FLUENT | 3 | August 28, 2011 02:46 |
UDF for transient pressure inlet, mass flow check at nozzle exit and volumetric heat | kokoory | FLUENT | 0 | August 17, 2011 03:07 |
specifying the flow direction in periodic boundary | joanna | FLUENT | 2 | February 27, 2006 22:09 |