CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens > STAR-CCM+

java injector creation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 15, 2009, 10:30
Default java injector creation
  #1
Member
 
TonyD
Join Date: Apr 2009
Posts: 85
Rep Power: 17
bramv101 is on a distinguished road
I am trying to create a java script to automate the creation of an injector coupled to a lagrangian phase. However this script is a recorded macro from a previous simulation with other names for the region and injector part.
How do I modify this script so it will ask to select this part that will serve as my injector.
See characters in RED where I am pointing to the older names....

Great thx


//injector 0 ---------------------------------------------------------------------------------------------------
Injector injector_0 =
simulation_0.get(InjectorManager.class).createInje ctor();

injector_0.setPresentationName("1.0");

injector_0.setInjectorType(PartInjector.class);

Region region_0 =
simulation_0.getRegionManager().getRegion("HEALED_BODY_1 ");

Boundary boundary_0 =
region_0.getBoundaryManager().getBoundary("inlet");

injector_0.getPartGroup().setObjects(boundary_0);

injector_0.setLagrangianPhase(lagrangianPhase_0);

InjectorMassFlowRate injectorMassFlowRate_0 =
injector_0.getInjectorValues().get(InjectorMassFlo wRate.class);

((ConstantScalarProfileMethod) injectorMassFlowRate_0.getMethod()).getQuantity(). setValue(6.0E-6);
bramv101 is offline   Reply With Quote

Old   September 15, 2009, 10:58
Default
  #2
Senior Member
 
Join Date: Mar 2009
Location: Austin, TX
Posts: 160
Rep Power: 18
kyle is on a distinguished road
I believe there is a section in the manual called "prompting for user input"

you may want to read that
kyle is offline   Reply With Quote

Old   September 15, 2009, 11:40
Default
  #3
Member
 
TonyD
Join Date: Apr 2009
Posts: 85
Rep Power: 17
bramv101 is on a distinguished road
Problem is already went through it .
Providing an interactive dialog seems the best for me, but i have no idea how to implement a part selection into this.
bramv101 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
satexe.exe error when executing another Java program macwind2 Phoenics 0 June 12, 2009 06:07
How to open the ICEM help with java? windhair CFX 2 May 18, 2007 07:05
Getting OpenFOAM to coexist with an existing JAVA VM nik777 OpenFOAM Installation 5 February 22, 2007 08:21
CCM+: unable to locate Java VM Amod Kumar Siemens 0 March 22, 2005 01:42
java vs c++ zxaar Main CFD Forum 10 December 3, 2004 03:05


All times are GMT -4. The time now is 07:27.