Package org.openpixi.pixi.physics.force

Examples of org.openpixi.pixi.physics.force.ConstantForce


    p.setVy(vy);
    p.setMass(1);
    p.setCharge(charge);
    stt.addParticle(p);

    ConstantForce force = new ConstantForce();
    force.ex = ex;
    force.bz = bz;
    stt.addForce(force);

    Simulation s = new Simulation(stt);
View Full Code Here


  public void writePosition() {
    writePosition =! writePosition;
    if(writePosition)
    {
      s.f.clear();
      ConstantForce force = new ConstantForce();
      force.bz = - 0.23; // -ConstantsSI.g;
      //force.gy = -1;
      //force.drag = 0.08;
      s.f.add(force);
      s.particles = InitialConditions.createRandomParticles(s.getWidth(), s.getHeight(), s.getSpeedOfLight(), 1, 1);
View Full Code Here

    if(relativistic == false) {
      if (s.f instanceof CombinedForce) {
        ArrayList<Force> forces = ((CombinedForce) s.f).forces;
        for (int j = 0; j < forces.size(); j++) {
          if (forces.get(j) instanceof ConstantForceRelativistic){
            forces.set(j, new ConstantForce());
          }
          if (forces.get(j) instanceof SimpleGridForceRelativistic){
            forces.set(j, new SimpleGridForce());
          }
        }
View Full Code Here

    p.setVy(vy);
    p.setMass(1);
    p.setCharge(charge);
    stt.addParticle(p);

    ConstantForce force = new ConstantForce();
    force.ex = ex;
    force.bz = bz;
    stt.addForce(force);

    Simulation s = new Simulation(stt);
View Full Code Here

    stt.setSpeedOfLight(stt.getCellWidth() / stt.getTimeStep());

    stt.setSimulationWidth(100);
    stt.setSimulationHeight(100);

    stt.addForce(new ConstantForce());
    stt.setParticleList(
        createRandomParticles(stt.getSimulationWidth(), stt.getSimulationHeight(),
        stt.getSpeedOfLight() / 3, count, radius));
    stt.setBoundary(GeneralBoundaryType.Hardwall);
    //stt.setParticleSolver(new EulerRichardson());
View Full Code Here

    stt.setTimeStep(1);
    stt.setSpeedOfLight(3);
    stt.setSimulationWidth(100);
    stt.setSimulationHeight(100);

    ConstantForce cf = new ConstantForce();
    cf.gy = -1;
    stt.addForce(cf);
    stt.setParticleList(
        createRandomParticles(stt.getSimulationWidth(), stt.getSimulationHeight(),
        stt.getSpeedOfLight(), count, radius));
View Full Code Here

    stt.setTimeStep(1);
    stt.setSpeedOfLight(3);
    stt.setSimulationWidth(100);
    stt.setSimulationHeight(100);

    ConstantForce cf = new ConstantForce();
    cf.ey = -1;
    stt.addForce(cf);
    stt.setParticleList(
        createRandomParticles(stt.getSimulationWidth(), stt.getSimulationHeight(),
        stt.getSpeedOfLight(), count, radius));
View Full Code Here

    stt.setTimeStep(1);
    stt.setSpeedOfLight(3);
    stt.setSimulationWidth(100);
    stt.setSimulationHeight(100);

    ConstantForce cf = new ConstantForce();
    cf.bz = -1;
    stt.addForce(cf);
    stt.setParticleList(
        createRandomParticles(stt.getSimulationWidth(), stt.getSimulationHeight(),
        stt.getSpeedOfLight(), count, radius));
View Full Code Here

    stt.setTimeStep(1);
    stt.setSpeedOfLight(3);
    stt.setSimulationWidth(100);
    stt.setSimulationHeight(100);

    stt.addForce(new ConstantForce());
    stt.addForce(new SpringForce());

    stt.setParticleList(new ArrayList<Particle>());

    stt.setBoundary(GeneralBoundaryType.Periodic);
View Full Code Here

  /**
   * Test if prepare and complete return to the same initial conditions
   */
  public void testPrepareComplete() {
    Particle p = new ParticleFull();
    ConstantForce f = new ConstantForce();
    double step = 1.0;

    f.ex = 1.234;
    f.ey = 3.456;
    f.bz = 7.890;
View Full Code Here

TOP

Related Classes of org.openpixi.pixi.physics.force.ConstantForce

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.