|
[Sponsors] |
September 5, 2013, 06:48 |
how can i get the size of mesh with udf?
|
#1 |
New Member
Join Date: Oct 2012
Posts: 1
Rep Power: 0 |
i'm writting a udf program to calculate the erosion rate of a workpiece. i want to get the mesh size with udf. with which macro can i get it?
thank you! |
|
September 5, 2013, 16:11 |
|
#2 | |
Senior Member
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18 |
Quote:
DEFINE_ON_DEMAND(on_demand_calc) { Domain *d = Get_Domain(1); /* declare domain pointer since it is not passed as an argument to the DEFINE macro */ Thread *t; cell_t c; face_t f; int n = 0; thread_loop_c(t,d) { if (FLUID_THREAD_P(t)) { begin_c_loop(c,t) /* loops over cells in a cell thread */ { n += 1; } end_c_loop(c,t) } } Message("grid size: %d\n", n); } Regards |
||
April 3, 2018, 04:25 |
regarding cell dimensions
|
#3 | |
Member
Join Date: Oct 2017
Posts: 52
Rep Power: 9 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Number of cells in mesh don't match with size of cellLevel | colinB | OpenFOAM Meshing & Mesh Conversion | 14 | December 12, 2018 09:07 |
Ugly mesh around cylinder | rks171 | STAR-CCM+ | 4 | May 9, 2012 15:35 |
Phase locked average in run time | panara | OpenFOAM | 2 | February 20, 2008 15:37 |
Convergence moving mesh | lr103476 | OpenFOAM Running, Solving & CFD | 30 | November 19, 2007 15:09 |
How to control Minximum mesh space? | hung | FLUENT | 7 | April 18, 2005 10:38 |