CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > ANSYS Meshing & Geometry

[ANSYS Meshing] Print report with mesh metric

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 30, 2021, 15:32
Default Print report with mesh metric
  #1
Member
 
Adithya
Join Date: May 2021
Posts: 73
Rep Power: 5
Adithya_11 is on a distinguished road
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?
Adithya_11 is offline   Reply With Quote

Old   July 31, 2021, 17:23
Default
  #2
Senior Member
 
Kira
Join Date: Nov 2020
Location: Canada
Posts: 435
Rep Power: 9
aero_head is on a distinguished road
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 ++++++++//
aero_head is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 23:00.