CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Mesh Generation & Pre-Processing Software > Pointwise & Gridgen

splitting at closestPoint and simplify of journaling

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 13, 2014, 11:43
Post splitting at closestPoint and simplify of journaling
  #1
Member
 
Vanessa Herwig
Join Date: May 2014
Posts: 36
Rep Power: 12
v_herw is on a distinguished road
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 is offline   Reply With Quote

Old   May 14, 2014, 06:49
Wink
  #2
Member
 
Vanessa Herwig
Join Date: May 2014
Posts: 36
Rep Power: 12
v_herw is on a distinguished road
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.
v_herw is offline   Reply With Quote

Reply

Tags
boundary conditions, closes point, split


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



All times are GMT -4. The time now is 14:52.