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.
流体全般

流体全般

フェイス中心の座標

    • FAQFAQ
      Participant

      フェイス中心の座標は、F_CENTROIDマクロを利用して取得できます。 以下の例は、DEFINE_ON_DEMANDを使用したフェイス中心の座標へのアクセス例です。 ※実行すると、FLUENTのコンソールにフェイス中心の座標とIDが表示されます。 #include “udf.h” DEFINE_ON_DEMAND(ondemand) { Domain *d = Get_Domain(1); int ID = 2; Thread *t =Lookup_Thread(d, ID); face_t f; real x[ND_ND],x1,y1,z1; begin_f_loop(f,t) { F_CENTROID(x,f,t); x1=x[0]; y1=x[1]; z1=x[2]; Message(“face : %d,%f,%f,%f,%dn”,f,x1,y1,z1,ID); } end_f_loop(f,t) }