|
[Sponsors] |
October 1, 2013, 10:12 |
Java with CCM+
|
#1 |
Member
Join Date: Oct 2011
Location: Thessaloniki, Greece
Posts: 75
Rep Power: 14 |
Hello,
I am trying to write some Java script for some automation of tasks. I am totally new in this, so I guess the question will sound trivial to some. I want ,for example, to erase all the chemical species which are loaded in my continuum. To erase a particular one, I have the following script: Simulation simulation_0 = getActiveSimulation(); PhysicsContinuum physicsContinuum_0 = ((PhysicsContinuum)simulation_0.getContinuumManage r().getContinuum("continuum")); MultiComponentGasModel multiComponentGasModel_0 = physicsContinuum_0.getModelManager().getModel(Mult iComponentGasModel.class); GasMixture gasMixture_0 = ((GasMixture) multiComponentGasModel_0.getMixture()); GasComponent gasComponent_0 = ((GasComponent) gasMixture_0.getComponents().getComponent("Chemica l_1")); gasMixture_0.getComponents().deleteMixtureComponen ts(new NeoObjectVector(new Object[] {gasComponent_0})); So that it will erase the gasComponent_0 defined by chemical_1 How can I simply select all the gasComponent and put them in the new object to then erase them? Moreover, without knowing the name of the species (chemical_1), how can I selection the gasComponent on a specific position on the array? I tried with something like ((GasComponent) gasMixture_0.getComponents().getComponent([1])); but without success. If I can do that, I then can loop and erase one by on all the species. Thank you for your help |
|
Tags |
ccm+, java |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
problem when imported geometry from 3D CAD to star ccm, | TAREK GANAT | STAR-CCM+ | 1 | May 21, 2013 22:15 |
Macro to access java files in sub-directory | abraum | STAR-CCM+ | 3 | July 11, 2012 02:46 |
Fluent Vs Star CCM | firda | Main CFD Forum | 3 | February 26, 2011 02:51 |
error in star ccm | maurizio | Siemens | 3 | October 16, 2007 05:17 |
Getting OpenFOAM to coexist with an existing JAVA VM | nik777 | OpenFOAM Installation | 5 | February 22, 2007 07:21 |