|
[Sponsors] | |||||
|
|
|
#1 |
|
Member
Vanessa Herwig
Join Date: May 2014
Posts: 36
Rep Power: 13 ![]() |
Hi All,
again a scripting question. I am trying to create an Unstructured Domain. I did it by Hand while Journaling and the Output was: Code:
set _TMP(mode_10) [pw::Application begin Create]
set _CN(3) [pw::GridEntity getByName "con-1"]
set _TMP(edge_3) [pw::Edge create]
$_TMP(edge_3) addConnector $_CN(3)
set _CN(2) [pw::GridEntity getByName "Boundary Layer Con"]
$_TMP(edge_3) addConnector $_CN(2)
$_TMP(edge_3) addConnector $_CN(3)
set _CN(4) [pw::GridEntity getByName "con-2"]
$_TMP(edge_3) addConnector $_CN(4)
set _CN(5) [pw::GridEntity getByName "con-3"]
$_TMP(edge_3) addConnector $_CN(5)
set _CN(6) [pw::GridEntity getByName "con-4"]
$_TMP(edge_3) addConnector $_CN(6)
set _CN(7) [pw::GridEntity getByName "con-5"]
$_TMP(edge_3) addConnector $_CN(7)
set _CN(8) [pw::GridEntity getByName "con-6"]
$_TMP(edge_3) addConnector $_CN(8)
set _TMP(dom_1) [pw::DomainUnstructured create]
$_TMP(dom_1) addEdge $_TMP(edge_3)
unset _TMP(edge_3)
$_TMP(mode_10) end
unset _TMP(mode_10)
unset _TMP(dom_1)
pw::Application markUndoLevel {Assemble Domain}
set _TMP(mode_10) [pw::Application begin Create]
$_TMP(mode_10) abort
unset _TMP(mode_10)
Code:
set DomCon[list $_CN(2) $_CN(3) $_CN(4) $_CN(5) $_CN(6) $_CN(7) $_CN(8) $_CN(3)]
set UnstrDomMode [pw::Application begin Create]
foreach con $DomCon {
set EdgeCreate [pw::Edge create]
$EdgeCreate addConnector $con
set DomCreate [pw::DomainUnstructured create]
$DomCreate addEdge $EdgeCreate
}
$UnstrDomMode end
![]() Is the Mode created in the right way or is it completely not what it should look like. Unfortunately I didn't find anything on the Glyph2 homepage. Thanks for your help. Vanessa |
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
Travis Carrigan
Join Date: Jul 2010
Location: Arlington, TX
Posts: 161
Rep Power: 17 ![]() |
Hello Vanessa,
You're close, but you wrapped up too much in your foreach loop. Also, I noticed your connector list has duplicates. Here's a general procedure for creating an unstructured domain from a list of connectors: Code:
proc DomUnsConnectors { conList } {
set edge [pw::Edge create]
foreach con $conList {
$edge addConnector $con
}
set domain [pw::DomainUnstructured create]
$domain addEdge $edge
return $domain
}
I want to mention that this code can be found by browsing the GlyphUtilityLibrary repository on GitHub. There are many functions for creating and manipulating the various entities that Pointwise supports. |
|
|
|
|
|
|
|
|
#3 |
|
Member
Vanessa Herwig
Join Date: May 2014
Posts: 36
Rep Power: 13 ![]() |
Hi Travis,
this procedure looks much nicer than my created one.. ![]() I put some of the connectors twice in the list because PW told me that the edge is not closed (I get the same when I proceed with your procedure): Code:
Script: ----- TCL TRACE ----- Script: ERROR: (EXCEPTION) Edge is not closed Script: Script: while executing Script: "$domain addEdge $edge" Script: (file "C:/temporary/Workstation/pointwise/journaling/Farfield.jrn" line 130) How can i ensure that i don't include my database cons and also have my wake con twice in it. (In the original code it is _CN(3)) Thank you. Vanessa ps: I didn't find the library yet - thank you for giving me the link to it.
|
|
|
|
|
|
![]() |
| Tags |
| glyph2, mode, unstructured mesh |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [ICEM] Creating unstructured mesh and setting mesh sizes | cfdworks | ANSYS Meshing & Geometry | 0 | February 25, 2014 23:23 |
| [ICEM] Orthogonality/Skew issues in 3D unstructured mesh | eddyy19g | ANSYS Meshing & Geometry | 3 | February 13, 2014 10:36 |
| [mesh manipulation] polyDualMesh, create a tetrahedral mesh from a polyhedral mesh | Martin80 | OpenFOAM Meshing & Mesh Conversion | 5 | January 30, 2013 23:07 |
| [ICEM] Why do I have to convert my mesh to an unstructured mesh? | iznish | ANSYS Meshing & Geometry | 1 | November 2, 2012 09:29 |
| Where's the singularity/mesh flaw? | audrich | FLUENT | 3 | August 4, 2009 02:07 |