CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT

Fix UDF to flap the mesh instead of rotating it

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   February 18, 2024, 03:33
Default Fix UDF to flap the mesh instead of rotating it
New Member
johnny simson
Join Date: Nov 2023
Posts: 17
Rep Power: 2
bored_bot is on a distinguished road
Hey guys!

I've been trying to replicate an ANSYS how-to video:

In this they describe replicating a flapping motion of a door, I wrote my UDF file exactly as they showed, instead of getting a nice flapping motion, I'm getting a rotation. Now I'm guessing the center of gravity could be the cause of this issue (highly unlikely) since we both didn't start with the same mesh I'm guessing?

I'm guessing the theta_max defined in the UDF isn't working as well?

tbh, I don't know what's going on, any clarification would be really helpful. Please do ask me anything that could help you diagnose this issue. Thank you guys!

btw I've followed the same dimensions of the rectangle/door but the domain mesh was an arbitrary rectangular mesh that just encompassed the rectangle/door. Please find the following attachments to better help you. btw i noticed that the omega in my udf file is properly intended unlike the one shown in the video. could this be an issue?

Attached Images
File Type: png meshing_parameters.png (73.7 KB, 3 views)

Last edited by bored_bot; February 18, 2024 at 03:38. Reason: changed attachment, added more info
bored_bot is offline   Reply With Quote

Old   February 18, 2024, 09:10
Lightbulb Solved!
New Member
johnny simson
Join Date: Nov 2023
Posts: 17
Rep Power: 2
bored_bot is on a distinguished road
The reason this was happening is because of the inconsistent angle units, a mixup of degrees and radians (oh god I hate this, why didn't we just stick with one thing, imagine writing an entire engineering exam and realising your calculator was stuck on radians whilst they wanted degrees; anyways i digress)

Here is the only change:
#define angular_freq 2.0*Freq*M_PI/180
The rest of the code mentioned in the video is correct (thank god) I'm not sure why this wasn't corrected while they filmed it. Maybe it was correct back then since it was 5 years old to their aid.

Anyways, happy simulating!
bored_bot is offline   Reply With Quote


flapping motion, motion dynamicmesh, udf cg motion, udf code

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 05:38
Rotating Mesh - Mesh Overlap/Discontinuity At Boundary Interface sai95kamal FLUENT 1 June 15, 2020 08:58
Dynamic mesh, hinged flap Randre FLUENT 37 August 9, 2014 10:40
Udf with a sliding mesh mani1455 Fluent UDF and Scheme Programming 0 April 16, 2014 05:21
How to control Minximum mesh space? hung FLUENT 7 April 18, 2005 09:38

All times are GMT -4. The time now is 01:10.