CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Pointwise & Gridgen (https://www.cfd-online.com/Forums/pointwise/)
-   -   splitting at closestPoint and simplify of journaling (https://www.cfd-online.com/Forums/pointwise/135426-splitting-closestpoint-simplify-journaling.html)

v_herw May 13, 2014 10:43

splitting at closestPoint and simplify of journaling
 
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]

the other question I have is:

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

v_herw May 14, 2014 05:49

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]
$x, $y, $z are the coordinates which you have to input.


All times are GMT -4. The time now is 02:55.