public void solveProblem() { var fluxProblem = new FluxProblem(density, diameter, viscosity, mass); problemSolver = new FluxProblemSolver(fluxProblem, paso, y0); reset(); }
public FluxProblemSolver(FluxProblem fluxProblem, double step, double y0) { this.fluxProblem = fluxProblem; this.y0 = y0; // Solve the problem. t0 = Math.Sqrt(2 * y0 / g); rk4 = new RK4(step, t0, -t0 * g, f, minPos); Debug.Log("v(t) calculated"); integ = new Integration(rk4.getResults(), 0, t0, step); Debug.Log("x(t) calculated"); tf = step * rk4.getResults().Length + t0; Debug.Log("Final time calculated: " + tf); }