mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: propellerInfo - protection against Uref = 0
This commit is contained in:
@ -729,13 +729,23 @@ void Foam::functionObjects::propellerInfo::writeAxialWake
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::functionObjects::propellerInfo::writeWakeFields(const scalar URef)
|
void Foam::functionObjects::propellerInfo::writeWakeFields(const scalar URef0)
|
||||||
{
|
{
|
||||||
if (!writeWakeFields_)
|
if (!writeWakeFields_)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
scalar URef = URef0;
|
||||||
|
if (mag(URef) < ROOTSMALL)
|
||||||
|
{
|
||||||
|
WarningInFunction
|
||||||
|
<< "Magnitude of reference velocity should be greater than zero"
|
||||||
|
<< endl;
|
||||||
|
|
||||||
|
URef = ROOTVSMALL;
|
||||||
|
}
|
||||||
|
|
||||||
// Normalised velocity
|
// Normalised velocity
|
||||||
const vectorField UDisk(interpolate(U(), vector::uniform(nanValue_))());
|
const vectorField UDisk(interpolate(U(), vector::uniform(nanValue_))());
|
||||||
const vectorField UrDisk(coordSysPtr_->localVector(UDisk));
|
const vectorField UrDisk(coordSysPtr_->localVector(UDisk));
|
||||||
|
|||||||
Reference in New Issue
Block a user