void FluidSimulator::advect(double timeStep){
	dt = timeStep;
	extrapolateVelocity();
	advectVelocity();
	advectPressure();
	
}
Example #2
0
void simulateFluids(void)
{
    // simulate fluid
    advectVelocity(dvfield, (float *)vxfield, (float *)vyfield, DIM, RPADW, DIM, DT);
    diffuseProject(vxfield, vyfield, CPADW, DIM, DT, VIS);
    updateVelocity(dvfield, (float *)vxfield, (float *)vyfield, DIM, RPADW, DIM);
    advectParticles(vbo, dvfield, DIM, DIM, DT);
}
Example #3
0
void GLFluids::simulateFluids(void)
{
    // simulate fluid
    advectVelocity(dvfield, (float *)vxfield, (float *)vyfield, DIM, RPADW, DIM, DT);
    diffuseProject(vxfield, vyfield, CPADW, DIM, DT, VIS, planr2c, planc2r);
    updateVelocity(dvfield, (float *)vxfield, (float *)vyfield, DIM, RPADW, DIM);
    advectParticles(cuda_vbo_resource, dvfield, DIM, DIM, DT);
}
Example #4
0
void StableFluid3D::step(double dt)
{
	// solve velocity
	std::swap(velocities, tempVelocities);
	advectVelocity(dt);
	std::swap(velocities, tempVelocities);

	addForcesToVelocity(dt);
	projectVelocity(dt);

	// solve pressure

	//	std::swap(pressure, tempPressure);
	//	advectPressure(dt);
}