Local definitions and initialization
Mesh quantities
It may be useful to access some mesh adjacencies and quantities, in which case local pointers allow for more readable code:
Associated properties
Accessing cell porosity property values is required so values may be set:
Example: define porosity by geometric zones
Individual cell porosity values can be assigned to each cell, so they may be based on groups, geometric criteria, or any other time-independent functions:
if (x < 20.)
cpro_porosi[cell_id] = 1.;
else
cpro_porosi[cell_id] = 0.5;
}
halo_type);
Matching face equivalent surfaces should also be assigned in a corresponding manner, for interior faces:
if (x > 19.9999)
face_porosity = 0.5;
for (int i = 0; i < 3; i++)
i_f_face_normal[face_id][i] = face_porosity * i_face_normal[face_id][i];
mq->
i_f_face_surf[face_id] = cs_math_3_norm(i_f_face_normal[face_id]);
}
and for boundary faces:
if (x > 19.9999)
face_porosity = 0.5;
for (int i = 0; i < 3; i++)
b_f_face_normal[face_id][i] = face_porosity * b_face_normal[face_id][i];
mq->
b_f_face_surf[face_id] = cs_math_3_norm(b_f_face_normal[face_id]);
}