diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
index 5ef2963b7c..2e40531282 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
@@ -409,7 +409,7 @@ namespace OpenSim.Region.Terrain
{
case "aerobic":
// WindSpeed, PickupMinimum,DropMinimum,Carry,Rounds,Lowest
- heightmap.AerobicErosion(Convert.ToDouble(args[2]), Convert.ToDouble(args[3]), Convert.ToDouble(args[4]), Convert.ToDouble(args[5]), Convert.ToInt32(args[6]), Convert.ToBoolean(args[7]));
+ heightmap.AerobicErosion(Convert.ToDouble(args[2]), Convert.ToDouble(args[3]), Convert.ToDouble(args[4]), Convert.ToDouble(args[5]), Convert.ToInt32(args[6]), Convert.ToBoolean(args[7]), true);
break;
case "thermal":
heightmap.thermalWeathering(Convert.ToDouble(args[2]), Convert.ToInt32(args[3]), Convert.ToDouble(args[4]));
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/AerobicErosion.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/AerobicErosion.cs
index 870b9b2b2b..97c2762678 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/AerobicErosion.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/AerobicErosion.cs
@@ -74,7 +74,7 @@ namespace libTerrain
/// The percentage of rock which can be picked up to pickup 0..1
/// The number of erosion rounds (recommended: 25+)
/// Drop sediment at the lowest point?
- public void AerobicErosion(double windspeed, double pickup_talus_minimum, double drop_talus_minimum, double carry, int rounds, bool lowest)
+ public void AerobicErosion(double windspeed, double pickup_talus_minimum, double drop_talus_minimum, double carry, int rounds, bool lowest, bool usingFluidDynamics)
{
Channel wind = new Channel(w, h) ;
Channel sediment = new Channel(w, h);
@@ -83,7 +83,15 @@ namespace libTerrain
wind = this.copy();
wind.normalise(); // Cheap wind calculations
wind *= windspeed;
- wind.pertubation(30); // Can do better later
+
+ if (usingFluidDynamics)
+ {
+ wind.navierStokes(20, 0.1, 0.0, 0.0);
+ }
+ else
+ {
+ wind.pertubation(30); // Can do better later
+ }
for (i = 0; i < rounds; i++)
{
@@ -115,10 +123,19 @@ namespace libTerrain
}
}
}
- sediment.pertubation(10); // Sediment is blown around a bit
- sediment.seed++;
- wind.pertubation(15); // So is the wind
- wind.seed++;
+
+ if (usingFluidDynamics)
+ {
+ sediment.navierStokes(7, 0.1, 0.0, 0.1);
+ wind.navierStokes(10, 0.1, 0.0, 0.0);
+ }
+ else
+ {
+ wind.pertubation(15); // Can do better later
+ wind.seed++;
+ sediment.pertubation(10); // Sediment is blown around a bit
+ sediment.seed++;
+ }
// Convert some sand to rock
for (x = 1; x < w - 1; x++)
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/NavierStokes.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/NavierStokes.cs
index f01b28602b..43987d4597 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/NavierStokes.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/NavierStokes.cs
@@ -248,9 +248,9 @@ namespace libTerrain
/// Performs computational fluid dynamics on a channel
///
/// The number of steps to perform (Recommended: 20)
- /// Delta Time - The time between steps
- /// Fluid diffusion rate
- /// Fluid viscosity
+ /// Delta Time - The time between steps (Recommended: 0.1)
+ /// Fluid diffusion rate (Recommended: 0.0)
+ /// Fluid viscosity (Recommended: 0.0)
public void navierStokes(int rounds, double dt, double diff, double visc)
{
nsSimulate(this.h, rounds, dt, diff, visc);