Skip to content

Instantly share code, notes, and snippets.

@linjorejoy
Created June 3, 2022 11:51
Show Gist options
  • Select an option

  • Save linjorejoy/b94e1708d3b90ec73d9adcff9c992b10 to your computer and use it in GitHub Desktop.

Select an option

Save linjorejoy/b94e1708d3b90ec73d9adcff9c992b10 to your computer and use it in GitHub Desktop.
The User Defined Function (UDF) Code used to model the alternating velocity of air flow in the vortex generator created by a sinusoidally oscillating diaphragm.
#include "udf.h"
DEFINE_PROFILE(unsteady_velocity,thread,position) {
face_t f;
real t=CURRENT_TIME;
begin_f_loop(f,thread) {
F_PROFILE(f,thread,position)=6*sin(30*t);
} end_f_loop(f,thread)
}
@linjorejoy
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment