CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ANSYS Meshing & Geometry (https://www.cfd-online.com/Forums/ansys-meshing/)
-   -   [ICEM] ICEM in batch mode : determinant (https://www.cfd-online.com/Forums/ansys-meshing/156976-icem-batch-mode-determinant.html)

baba@cfd July 16, 2015 10:15

ICEM in batch mode : determinant
 
Hello,

I'm trying to write a simple script in batch mode which calculates the Determinant min (mesh quality) of a mesh.

For the moment I tried:

ic_empty_tetin
ic_read_external C://[path]/readcgns.exe D:/users/toto/Desktop/test.cgns
ic_str_metric Determinant {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15}

I launch this through the ICEM batch mode (C:/icemcfd -batch -script myscript.rpl)
But it doesn't work. In fact it is not doing anything.
I think it calculates the stuff but how can I ask him to print the results or to write it in a file?

I am thankful for any help!

baba@cfd July 21, 2015 04:40

No one can help me please ?

Sune July 23, 2015 08:20

You can try this approach:

Code:

set diag [ic_str_metric Determinant {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15}]

set d0 [lindex $diag 0]
set d1 [lindex $diag 1]
set d2 [lindex $diag 2]
set d3 [lindex $diag 3]
set d4 [lindex $diag 4]
set d5 [lindex $diag 5]

if $d0 {
mess "Determinant:\n  Min = $d3\n  Max = $d4\n  Mean = [expr $d5 / ($d0 + 0.0)"
} else {
mess "Error! Domain most likely incorrectly defined"
}


baba@cfd July 27, 2015 04:51

Hi,

Thanks a lot for your help. It works well !!

Is there any option to select all the domains in my mesh for the calculation of the determinant instead of writing {1 2 3 4 5 6 7 8 9 10 11 12 13 14 15} ?

Sune July 27, 2015 06:09

The ICEM Programmer's Guide gives little help for this function:
Code:

ic_str_metric type domains
I guess the s in domains indicates that it can take a list of domains.
You can build a list of all domains like this:
Code:

set doms ""
foreach dom [ic_str_list_entities domain] {
    lappend doms $dom
}

/Sune

baba@cfd July 27, 2015 07:24

In fact it works just with the command : ic_str_list_entities domain.
It builds the list I wanted.

Thank you Sune !


All times are GMT -4. The time now is 13:22.