diff --git a/Source/WindFarmParametrization/SimpleActuatorDisk/ERF_AdvanceSimpleAD.cpp b/Source/WindFarmParametrization/SimpleActuatorDisk/ERF_AdvanceSimpleAD.cpp index 7709f6355..e8fde2ef5 100644 --- a/Source/WindFarmParametrization/SimpleActuatorDisk/ERF_AdvanceSimpleAD.cpp +++ b/Source/WindFarmParametrization/SimpleActuatorDisk/ERF_AdvanceSimpleAD.cpp @@ -225,4 +225,24 @@ SimpleAD::source_terms_cellcentered (const Geometry& geom, simpleAD_array(i,j,k,1) = source_y; }); } + + // Compute power based on the look-up table + + if (ParallelDescriptor::IOProcessor()){ + static std::ofstream file("power_output.txt", std::ios::app); + // Check if the file opened successfully + if (!file.is_open()) { + std::cerr << "Error opening file!" << std::endl; + Abort("Could not open file to write power output in ERF_AdvanceSimpleAD.cpp"); + } + Real total_power = 0.0; + for(int it=0; it