diff --git a/src/functionObjects/field/streamLine/streamLineBase.C b/src/functionObjects/field/streamLine/streamLineBase.C index 0c1616d16d4ec4f1fd281e1d9a9c31d889124d01..2a489fdc78ae8e6d2d245e93647011cd02704551 100644 --- a/src/functionObjects/field/streamLine/streamLineBase.C +++ b/src/functionObjects/field/streamLine/streamLineBase.C @@ -512,7 +512,7 @@ bool Foam::functionObjects::streamLineBase::read(const dictionary& dict) Info<< type() << " " << name() << ":" << nl; dict.lookup("fields") >> fields_; - dict.lookup("U") >> UName_; + UName_ = dict.lookupOrDefault<word>("U", "U"); if (findIndex(fields_, UName_) == -1) {