diff --git a/src/gpu/VirtualFluids_GPU/Parameter/Parameter.cpp b/src/gpu/VirtualFluids_GPU/Parameter/Parameter.cpp index 046846765832694e3fab9190b00747a9b980ed34..dc7d5cb07e573003bfebfa7ef327dddb1f9d4aa4 100644 --- a/src/gpu/VirtualFluids_GPU/Parameter/Parameter.cpp +++ b/src/gpu/VirtualFluids_GPU/Parameter/Parameter.cpp @@ -803,17 +803,61 @@ void Parameter::setPressRatio(real PressRatio) { ic.delta_press = PressRatio; } +real Parameter::getViscosityRatio() +{ + return ic.vis_ratio; +} +real Parameter::getVelocityRatio() +{ + return ic.u0_ratio; +} +real Parameter::getDensityRatio() +{ + return ic.delta_rho; +} +real Parameter::getPressureRatio() +{ + return ic.delta_press; +} real Parameter::getTimeRatio() { return this->getViscosityRatio() * pow(this->getVelocityRatio(), -2); } +real Parameter::getLengthRatio() +{ + return this->getViscosityRatio() / this->getVelocityRatio(); +} real Parameter::getForceRatio() { - return this->getDensityRatio() * pow(this->getViscosityRatio(), 2); + return this->getDensityRatio() * this->getVelocityRatio()/this->getTimeRatio(); } -real Parameter::getLengthRatio() +real Parameter::getScaledViscosityRatio(int level) { - return this->getViscosityRatio() / this->getVelocityRatio(); + return this->getViscosityRatio()/(level+1); +} +real Parameter::getScaledVelocityRatio(int level) +{ + return this->getVelocityRatio(); +} +real Parameter::getScaledDensityRatio(int level) +{ + return this->getDensityRatio(); +} +real Parameter::getScaledPressureRatio(int level) +{ + return this->getPressureRatio(); +} +real Parameter::getScaledTimeRatio(int level) +{ + return this->getTimeRatio()/(level+1); +} +real Parameter::getScaledLengthRatio(int level) +{ + return this->getLengthRatio()/(level+1); +} +real Parameter::getScaledForceRatio(int level) +{ + return this->getForceRatio()*(level+1); } void Parameter::setRealX(real RealX) { @@ -1838,22 +1882,6 @@ real Parameter::getVelocity() { return ic.u0; } -real Parameter::getViscosityRatio() -{ - return ic.vis_ratio; -} -real Parameter::getVelocityRatio() -{ - return ic.u0_ratio; -} -real Parameter::getDensityRatio() -{ - return ic.delta_rho; -} -real Parameter::getPressureRatio() -{ - return ic.delta_press; -} real Parameter::getRealX() { return ic.RealX; diff --git a/src/gpu/VirtualFluids_GPU/Parameter/Parameter.h b/src/gpu/VirtualFluids_GPU/Parameter/Parameter.h index eae34290947e203731bff222f0275a482c7500b7..813e6007737bbf402c9d54d5247597275637d096 100644 --- a/src/gpu/VirtualFluids_GPU/Parameter/Parameter.h +++ b/src/gpu/VirtualFluids_GPU/Parameter/Parameter.h @@ -753,6 +753,20 @@ public: real getLengthRatio(); //! \returns the force ratio in SI/LB units real getForceRatio(); + //! \returns the viscosity ratio in SI/LB units scaled to the respective level + real getScaledViscosityRatio(int level); + //! \returns the velocity ratio in SI/LB units scaled to the respective level + real getScaledVelocityRatio(int level); + //! \returns the density ratio in SI/LB units scaled to the respective level + real getScaledDensityRatio(int level); + //! \returns the pressure ratio in SI/LB units scaled to the respective level + real getScaledPressureRatio(int level); + //! \returns the time ratio in SI/LB units scaled to the respective level + real getScaledTimeRatio(int level); + //! \returns the length ratio in SI/LB units scaled to the respective level + real getScaledLengthRatio(int level); + //! \returns the force ratio in SI/LB units scaled to the respective level + real getScaledForceRatio(int level); real getRealX(); real getRealY(); real getRe();