CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Fix UDF to flap the mesh instead of rotating it

Register Blogs Community New Posts Updated Threads Search

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

I've been trying to replicate an ANSYS how-to video:
https://www.youtube.com/watch?v=Uktp5lBy0OU
https://www.youtube.com/watch?v=3Vsw9Khyvhg

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?

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

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

Old   February 18, 2024, 10:10
Lightbulb Solved!
  #2
New Member
 
johnny simson
Join Date: Nov 2023
Posts: 18
Rep Power: 3
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:
Code:
#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

Reply

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


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 06:38
Rotating Mesh - Mesh Overlap/Discontinuity At Boundary Interface sai95kamal FLUENT 1 June 15, 2020 09:58
Dynamic mesh, hinged flap Randre FLUENT 37 August 9, 2014 11:40
Udf with a sliding mesh mani1455 Fluent UDF and Scheme Programming 0 April 16, 2014 06:21
How to control Minximum mesh space? hung FLUENT 7 April 18, 2005 10:38


All times are GMT -4. The time now is 14:12.