Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.

Ansys Learning Forum Forums Discuss Simulation Fluids Acoustics simulations via the wave equation model Reply To: Acoustics simulations via the wave equation model

Federico
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);
}
[bingo_chatbox]