|
[Sponsors] |
Java Macro to change rigid body degree of freedom during the simulation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 9, 2015, 06:59 |
Java Macro to change rigid body degree of freedom during the simulation
|
#1 |
Member
Ahmed Elhanfi
Join Date: Nov 2014
Posts: 30
Rep Power: 12 |
Hi Everyone,
I'm looking for a way to enable/disable one degree of freedom in DFBI in Star-CCM+. I tried using Java macro to do this for me after a certain time, but it didn't work. This is what I used: // STAR-CCM+ macro: DFBI.java // Written by STAR-CCM+ 10.02.010 package macro; import java.util.*; import star.common.*; import star.base.neo.*; import star.sixdof.*; public class DFBI extends StarMacro { public void execute() { execute0(); } private void execute0() { Simulation simulation_0 = getActiveSimulation(); PhysicalTimeStoppingCriterion physicalTimeStoppingCriterion_0 = ((PhysicalTimeStoppingCriterion) simulation_0.getSolverStoppingCriterionManager().g etSolverStoppingCriterion("Maximum Physical Time")); if (simulation_0.getSolution().getPhysicalTime()>0.2) {Body body_0 = ((Body) simulation_0.get(BodyManager.class).getObject("Bod y 1")); ((BodyFreeMotion) body_0.getMotionType()).setFreeTranslationX(false) ;} } } I hope you can help me. Cheers, Ahmed. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Rigid body solution or Immersed solid | omidiut | CFX | 1 | July 3, 2012 03:36 |
Degree of freedom in free surface simulation ? | eee | CFX | 1 | September 23, 2010 19:25 |
degree of freedom | ztdep | Main CFD Forum | 1 | January 12, 2009 09:16 |
6 Degree of Freedom Navier Stoke Equations | Apollo | Main CFD Forum | 6 | July 21, 2004 17:46 |
6 Degree of Freedom Navier Stoke Equations | Apollo | FLUENT | 0 | July 5, 2004 06:34 |