|
[Sponsors] | |||||
splitting at closestPoint and simplify of journaling |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
Member
Vanessa Herwig
Join Date: May 2014
Posts: 36
Rep Power: 13 ![]() |
Hi,
another newbie scripting question. i have a question regarding splitting a database at ControlPoints. I would like to split a database into two databases by using the very foremost ControlPoint of the database. I found this: http://www.pointwise.com/glyph2/file...stControlPoint BUT I am not able to write it in the right way nor connect it with this splitting command: Code:
set DB_1 [pw::DatabaseEntity getByName "curve-1"] set split_params [$DB_1 getParameter -closest [pw::Application getXYZ [*foremost ControlPoint*]]]] set PW1 [$DB_1 split $split_params] Is it possible to simplify the Journaling of setting up the boundary conditions? My script looks like below and I think there might be a much nicer way... Code:
set _TMP(PW_26) [pw::BoundaryCondition create]
set _TMP(PW_25) [pw::BoundaryCondition getByName "bc-2"]
$_TMP(PW_25) setName "inlet"
$_TMP(PW_25) setPhysicalType {Velocity Inlet}
$_TMP(PW_25) apply[list[list $_DM(1) $_CN(7)]]
set _TMP(PW_28) [pw::BoundaryCondition create]
set _TMP(PW_27) [pw::BoundaryCondition getByName "bc-3"]
$_TMP(PW_27) setName "outlet"
$_TMP(PW_27) setPhysicalType {Outlet Vent}
$_TMP(PW_27) apply[list[list $_DM(1) $_CN(9)]]
set _TMP(PW_30) [pw::BoundaryCondition create]
set _TMP(PW_29) [pw::BoundaryCondition getByName "bc-4"]
$_TMP(PW_29) setName "pressure side"
$_TMP(PW_29) setPhysicalType {Wall}
$_TMP(PW_29) apply[list[list $_DM(2) $_CN(3)]]
Thank you very much for your help. Vanessa |
|
|
|
|
|
|
|
|
#2 |
|
Member
Vanessa Herwig
Join Date: May 2014
Posts: 36
Rep Power: 13 ![]() |
i found a example where it was shown how to generate the command to find the closest point.
Code:
split_params [lindex [$_DB(1) closestPoint {$x $y $z}] 0]
|
|
|
|
|
|
![]() |
| Tags |
| boundary conditions, closes point, split |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|