|
[Sponsors] |
[ANSYS Meshing] Print report with mesh metric |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 30, 2021, 15:32 |
Print report with mesh metric
|
#1 |
Member
Adithya
Join Date: May 2021
Posts: 73
Rep Power: 5 |
Hello
I am working with ANSYS Meshing. I want to create a report with all the mesh metrics. This cannot be done with the 'Report preview' option available rigt? I cannot find a way to do this. Could someone suggest how to generate a report only with the quality metrics? |
|
July 31, 2021, 17:23 |
|
#2 |
Senior Member
Kira
Join Date: Nov 2020
Location: Canada
Posts: 435
Rep Power: 9 |
1) Copy/paste the code below into a file with the suffix "*.js" 2) Run the Jscript file in ANSYS Meshing via "Tools -> Run Macro" //+++++++++ JScript code ++++++++// var DS = WB.AppletList.Applet( "DSApplet" ).App; var Nodes=DS.Tree.GetObjectByName("Mesh"); // Choose the metric to evaluate Nodes.MeshMetric=7; // 1=Element Quality, ..., 7=Skewness DS.Script.doMeshMetrics(); // Access properties var nelements = Nodes.Elements; // number of elements var nnodes = Nodes.Nodes; // number of nodes var min = Nodes.MeshMetricMin; // minimum value depending on the choice of the mesh metrics var max = Nodes.MeshMetricMax; // maximum value depending on the choice of the mesh metrics var avg = Nodes.MeshMetricAverage; // average value depending on the choice of the mesh metrics /// write to file var fso = new ActiveXObject("Scripting.FileSystemObject"); var a = fso.CreateTextFile("c:\testfile.txt", true); a.WriteLine("Mesh Metrics"); var str1 = "Number of Elements = " + String(nelements); a.WriteLine(str1); var str2 = "Number of Nodes = " + String(nnodes); a.WriteLine(str2); var str3 = "Minimum Metric Value = " + String(min); a.WriteLine(str3); var str4 = "Maximum Metric Value = " + String(max); a.WriteLine(str4); a.Close(); //+++++++++ END ++++++++//
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
foam-extend-4.1 release | hjasak | OpenFOAM Announcements from Other Sources | 19 | July 16, 2021 06:02 |
[ICEM] 2D hybrid mesh (unstructured mesh highly dependent on structured mesh parameters) | shubham jain | ANSYS Meshing & Geometry | 1 | April 10, 2017 06:03 |
[snappyHexMesh] Snappyhex mesh: poor inlet mesh | Swagga5aur | OpenFOAM Meshing & Mesh Conversion | 1 | December 3, 2016 17:59 |
Mesh Metric vs CFX Mesh Statistic | Marcin_Kos | CFX | 0 | October 26, 2016 07:54 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 22:11 |