MindMap Gallery UDF data structure, loop macro, geometry macro
Learn the first chapter of UDF function. UDF mainly involves many aspects such as data structure, loop macro and geometric macro. Subsequent updates…
Edited at 2024-04-09 14:37:44Avatar 3 centers on the Sully family, showcasing the internal rift caused by the sacrifice of their eldest son, and their alliance with other tribes on Pandora against the external conflict of the Ashbringers, who adhere to the philosophy of fire and are allied with humans. It explores the grand themes of family, faith, and survival.
This article discusses the Easter eggs and homages in Zootopia 2 that you may have discovered. The main content includes: character and archetype Easter eggs, cinematic universe crossover Easter eggs, animal ecology and behavior references, symbol and metaphor Easter eggs, social satire and brand allusions, and emotional storylines and sequel foreshadowing.
[Zootopia Character Relationship Chart] The idealistic rabbit police officer Judy and the cynical fox conman Nick form a charmingly contrasting duo, rising from street hustlers to become Zootopia police officers!
Avatar 3 centers on the Sully family, showcasing the internal rift caused by the sacrifice of their eldest son, and their alliance with other tribes on Pandora against the external conflict of the Ashbringers, who adhere to the philosophy of fire and are allied with humans. It explores the grand themes of family, faith, and survival.
This article discusses the Easter eggs and homages in Zootopia 2 that you may have discovered. The main content includes: character and archetype Easter eggs, cinematic universe crossover Easter eggs, animal ecology and behavior references, symbol and metaphor Easter eggs, social satire and brand allusions, and emotional storylines and sequel foreshadowing.
[Zootopia Character Relationship Chart] The idealistic rabbit police officer Judy and the cynical fox conman Nick form a charmingly contrasting duo, rising from street hustlers to become Zootopia police officers!
UDF data structure, loop macro, geometry macro
UDF fixed format start
#include "udf.h"
mesh structure
2D mesh
mesh face=face
mesh edge=face
3D mesh
mesh=cell
mesh face=face
grid edge=edge
Computational domain
Domain
cell thread(linked list)
cell
face thread(linked list)
faces
cell zone condition
solid1 (linked list) corresponds to a thread
Thread*t
solid2 (linked list) corresponds to a thread
Thread*t
fluid1 (linked list) corresponds to a thread
Thread*t
fluid2 (linked list) corresponds to a thread
Thread*t
Composed of many custom structures (grids)
cell_t c
boundary condition
inlet (linked list) corresponds to a thread
Thread*t
outlet (linked list) corresponds to a thread
Thread*t
wall (linked list) corresponds to a thread
Thread*t
wall(interior)(linked list) corresponds to a thread
Thread*t
Composed of many custom structures (grid surfaces)
face_t f
Variables are stored in grid (custom) structures
type of data
Domain*d
Thread*t
cell_t c
face_t f
Node *node
The format in the red part cannot be moved
real xc[ND_ND]
two-dimensional
real xc[2]
three dimensional
real xc[3]
Geometry Macro
Find geometric features
(c,t)
Thread *t and cell_t c
(f,t)
Thread *t and face_t f
C_NNODES(c, t)
Number of cell nodes
n=C_NNODES(c, t); Equivalent to defining int n;
C_NFACES(c, t)
Number of cells
F_NNODES(f, t)
subtopic
C_CENTROID(xc, c, t)
cell center coordinates
Current grid center coordinates
x→xc[0]
y→xc[1]
z→xc[2]
F_CENTROID(x, f, t)
face center coordinates
Current grid center coordinates
x→xc[0]
y→xc[1]
F_AREA(A, f, t)
face normal vector
usage
real area[ND_ND]; F_AREA(area, f, t)
x→area[0]
unit normal vector
area[0]/sqrt(area[0]*area[0] area[1]*area[1] area[2]*area[2])
y→area[1]
unit normal vector
area[1]/sqrt(area[0]*area[0] area[1]*area[1] area[2]*area[2])
z→area[2]
unit normal vector
area[2]/sqrt(area[0]*area[0] area[1]*area[1] area[2]*area[2])
NV_MAG(A)
grid area
sqrt(area[0]*area[0] area[1]*area[1] area[2]*area[2])
Use with F_AREA(A, f, t)
real A[ND_ND];real At; F_AREA(A, f, t); At=NV_MAG(A)
Assign area to At
C_VOLUME(c, t)
grid volume
C_VOLUME_2D(c, t)
2D mesh volume
Cuboid planar (extends infinitely in z direction)
Fluent believes that the Z direction is 1m
Axisymmetric
2Pi
NODE_X(nn)
Node coordinates
NODE_Y(nn)
Node coordinates
NODE_Z(nn)
Node coordinates
moving mesh
variable
C_R(c,t)
density
C_P(c,t)
pressure
C_U(c,t)
speed in x direction
C_V(c,t)
y direction speed
C_W(c,t)
z direction speed
C_T(c,t)
temperature
C_H(c,t)
enthalpy
C_K(c,t)
turbulent kinetic energy
C_D(c,t)
Turbulent kinetic energy dissipation rate
C_YI(c,t,i)
quality score
C_UDSI(c,t,i)
User-defined scalar
Loop macro
Thread loop
thread_loop_c(t,d)
Loop through the calculation domains (solid1, solid2, fluid1, fluid2) in cell zone condition
Assume that when solid1 is calculated, solid1 is t
thread_loop_f(t,d)
Loop through the calculation domains (inlet, outlet,...) in the boundary condition
Assume that when inlet is calculated, inlet is t
cell loop
begin_c_loop(c,t)
end_c_loop(c,t)
Can be used alone
Loop through the cells in t
Assume that when solid1 is calculated, solid1 is t
Loop over mesh in solid1
face loop
begin_f_loop(f,t)
end_f_loop(f,t)
Can be used alone
Loop through the cells in t
Assume that when inlet is calculated, inlet is t
Loop over the grid in the inlet
Use structure
thread_loop_c(t,d) { begin_c_loop(c,t) {...} end_c_loop(c,t) }
thread_loop_f(t,d) { begin_f_loop(f,t) {...} end_f_loop(f,t) }