Skip to content

Commit

Permalink
Correcting filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahesh Natarajan committed Dec 11, 2024
1 parent 7849906 commit 305fcad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Source/Initialization/Make.package
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CEXE_sources += ERF_Init1D.cpp
CEXE_sources += ERF_InitTurbPert.cpp

ifeq ($(USE_WINDFARM),TRUE)
CEXE_sources += ERFInitWindFarm.cpp
CEXE_sources += ERF_InitWindFarm.cpp
endif

ifeq ($(USE_NETCDF),TRUE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ WindFarm::init_windfarm_lat_lon (const std::string windfarm_loc_table,
file.close();

Real rad_earth = 6371.0e3; // Radius of the earth
Real km_per_deg_lat = rad_earth*2.0*M_PI/(2.0*180.0);

// Find the coordinates of average of min and max of the farm
// Rotate about that point
Expand All @@ -93,8 +94,8 @@ WindFarm::init_windfarm_lat_lon (const std::string windfarm_loc_table,
Real lon_min = *std::min_element(lon.begin(), lon.end());
Real lon_max = *std::max_element(lon.begin(), lon.end());

Real lat_cen = 0.5*(lat_min+lat_max)*M_PI/180.0;
Real lon_cen = 0.5*(lon_min+lon_max)*M_PI/180.0;
Real lat_cen = lat_min*M_PI/180.0;
Real lon_cen = lon_min*M_PI/180.0;

// (lat_lo, lon_lo) is mapped to (0,0)

Expand All @@ -119,12 +120,9 @@ WindFarm::init_windfarm_lat_lon (const std::string windfarm_loc_table,
yloc.push_back(dy_turb);
}

Real xloc_min = *std::min_element(xloc.begin(),xloc.end());
Real yloc_min = *std::min_element(yloc.begin(),yloc.end());

for(int it = 0;it<xloc.size(); it++){
xloc[it] = xloc[it] - xloc_min + windfarm_x_shift;
yloc[it] = yloc[it] - yloc_min + windfarm_y_shift;
xloc[it] = xloc[it] + windfarm_x_shift;
yloc[it] = yloc[it] + windfarm_y_shift;
}
}

Expand Down
2 changes: 1 addition & 1 deletion Source/WindFarmParametrization/Make.package
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CEXE_headers += ERF_WindFarm.H
CEXE_sources += ERF_InitWindFarm.cpp
CEXE_sources += ERF_WindFarm.cpp

0 comments on commit 305fcad

Please sign in to comment.