|
[Sponsors] |
October 2, 2013, 02:32 |
|
#3 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,695
Rep Power: 40 |
Quote:
This is untested, but should give you ideas about another approach. You may wish to add try/catch in various places to improve the robustness. Code:
import star.common.PhysicsContinuum; import star.common.Simulation; import star.common.StarMacro; import star.material.MixtureComponentManager; import star.material.MultiComponentGasModel; /** * Erase all species attached to given physics continuum */ public class EraseSpecies extends StarMacro { private Simulation sim_ = null; private static final String PHYSICS_NAME = "continuum"; /** The entry point for a StarMacro. */ @Override public void execute() { sim_ = this.getActiveSimulation(); PhysicsContinuum physics = (PhysicsContinuum) sim_.getContinuumManager().getContinuum(PHYSICS_NAME); MixtureComponentManager gasMixMgr = physics.getModelManager() .getModel(MultiComponentGasModel.class).getMixture().getComponents(); gasMixMgr.deleteChildren(gasMixMgr.getComponents()); } } |
||
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 |