Ansys Learning Forum › Forums › Discuss Simulation › Fluids › Acoustics simulations via the wave equation model › Reply To: Acoustics simulations via the wave equation model
October 28, 2024 at 1:11 pm
Ansys Employee
This is an example UDF for a mask, where you would gradually set the value from 0 near the source to 1 away from the source.
DEFINE_SOURCE_MASK(src_mask_define, c, t)
{
 real xc[3];
 real arg, fun;
 C_CENTROID(xc,c,t);
Â
arg = [expression that varies your source from 0 to 1 depending on the location relative to your source]
 fun = arg;
 return(fun);
}