diff options
author | jjesswan <jessica_wan@brown.edu> | 2024-05-10 03:41:20 -0400 |
---|---|---|
committer | jjesswan <jessica_wan@brown.edu> | 2024-05-10 03:41:20 -0400 |
commit | 7c0cd109b098b24279fb17b9a05ab846405d169b (patch) | |
tree | 3c7dcc4f098a83c5c14f5c4f42357a9ab6e1256e /src/ocean | |
parent | c5ff8ed6e95b7de0876dc5e97a9cb606fd84be85 (diff) |
particlesss
Diffstat (limited to 'src/ocean')
-rw-r--r-- | src/ocean/ocean_alt.cpp | 2 | ||||
-rw-r--r-- | src/ocean/ocean_alt.h | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/ocean/ocean_alt.cpp b/src/ocean/ocean_alt.cpp index 9ead324..751fca5 100644 --- a/src/ocean/ocean_alt.cpp +++ b/src/ocean/ocean_alt.cpp @@ -386,6 +386,8 @@ void ocean_alt::update_ocean() OceanSpray s; s.height = v; s.slope = norm; + s.slope_vector = Eigen::Vector2f(m_slopes_x[i][0], m_slopes_z[i][0]); + //std::cout << s.slope_vector << std::endl; m_heights.push_back(s); } diff --git a/src/ocean/ocean_alt.h b/src/ocean/ocean_alt.h index bbfce9a..7e293f9 100644 --- a/src/ocean/ocean_alt.h +++ b/src/ocean/ocean_alt.h @@ -30,6 +30,7 @@ struct FoamConstants{ struct OceanSpray{ Eigen::Vector3f height; Eigen::Vector3f slope; + Eigen::Vector2f slope_vector; }; @@ -79,8 +80,8 @@ private: const double Lx = 512.0; const double Lz = 512.0; - const int num_rows = 128; - const int num_cols = 128; + const int num_rows = 256; + const int num_cols = 256; const int num_tiles_x = 1; const int num_tiles_z = 1; @@ -91,7 +92,7 @@ private: const double lambda = .5; // how much displacement matters const double spacing = 1.0; // spacing between grid points - const double A = 100; // numeric constant for the Phillips spectrum + const double A = 10000; // numeric constant for the Phillips spectrum const double V = 100; // wind speed const double gravity = 9.81; const double L = V*V/gravity; |