View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003891 | OpenFOAM | Patch | public | 2022-09-21 12:17 | 2022-09-21 13:55 |
Reporter | tniemi | Assigned To | henry | ||
Priority | low | Severity | trivial | Reproducibility | N/A |
Status | resolved | Resolution | fixed | ||
Product Version | dev | ||||
Fixed in Version | dev | ||||
Summary | 0003891: Patch: better error messages for actuationDiskSource | ||||
Description | I have attached a small patch which fixes error messages in actuationDiskSource. At present the errors are quite confusing due to using a wrong error macro. Current error message: --> FOAM FATAL IO ERROR: file: unknown FOAM exiting Error after: --> FOAM FATAL IO ERROR: disk direction vector is approximately zero file: /turbineSiting/constant/fvModels/disk1 from line 19 to line 27. From function void Foam::fv::actuationDiskSource::readCoeffs() in file derived/actuationDiskSource/actuationDiskSource.C at line 65. FOAM exiting | ||||
Tags | No tags attached. | ||||
|
patch.diff (1,684 bytes)
diff --git a/src/fvModels/derived/actuationDiskSource/actuationDiskSource.C b/src/fvModels/derived/actuationDiskSource/actuationDiskSource.C index d64fda507..0c100aac7 100644 --- a/src/fvModels/derived/actuationDiskSource/actuationDiskSource.C +++ b/src/fvModels/derived/actuationDiskSource/actuationDiskSource.C @@ -62,7 +62,7 @@ void Foam::fv::actuationDiskSource::readCoeffs() diskDir_ = coeffs().lookup<vector>("diskDir"); if (mag(diskDir_) < vSmall) { - FatalErrorInFunction + FatalIOErrorInFunction(coeffs()) << "disk direction vector is approximately zero" << exit(FatalIOError); } @@ -71,7 +71,7 @@ void Foam::fv::actuationDiskSource::readCoeffs() Ct_ = coeffs().lookup<scalar>("Ct"); if (Cp_ <= vSmall || Ct_ <= vSmall) { - FatalErrorInFunction + FatalIOErrorInFunction(coeffs()) << "Cp and Ct must be greater than zero" << exit(FatalIOError); } @@ -79,7 +79,7 @@ void Foam::fv::actuationDiskSource::readCoeffs() diskArea_ = coeffs().lookup<scalar>("diskArea"); if (magSqr(diskArea_) <= vSmall) { - FatalErrorInFunction + FatalIOErrorInFunction(coeffs()) << "diskArea is approximately zero" << exit(FatalIOError); } @@ -88,7 +88,7 @@ void Foam::fv::actuationDiskSource::readCoeffs() upstreamCellId_ = mesh().findCell(upstreamPoint_); if (returnReduce(upstreamCellId_, maxOp<label>()) == -1) { - FatalErrorInFunction + FatalIOErrorInFunction(coeffs()) << "upstream location " << upstreamPoint_ << " not found in mesh" << exit(FatalIOError); } |
|
Resolved by commit c90671c8b7596e81c3090834b427221abae0a014 |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-09-21 12:17 | tniemi | New Issue | |
2022-09-21 12:17 | tniemi | File Added: patch.diff | |
2022-09-21 13:55 | henry | Assigned To | => henry |
2022-09-21 13:55 | henry | Status | new => resolved |
2022-09-21 13:55 | henry | Resolution | open => fixed |
2022-09-21 13:55 | henry | Fixed in Version | => dev |
2022-09-21 13:55 | henry | Note Added: 0012748 |