|
[Sponsors] |
Fix UDF to flap the mesh instead of rotating it |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 18, 2024, 04:33 |
Fix UDF to flap the mesh instead of rotating it
|
#1 |
New Member
johnny simson
Join Date: Nov 2023
Posts: 18
Rep Power: 3 |
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 Last edited by bored_bot; February 18, 2024 at 04:38. Reason: changed attachment, added more info |
|
February 18, 2024, 10:10 |
Solved!
|
#2 |
New Member
johnny simson
Join Date: Nov 2023
Posts: 18
Rep Power: 3 |
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 Anyways, happy simulating! |
|
Tags |
flapping motion, motion dynamicmesh, udf cg motion, udf code |
|
|
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 |