View Issue Details

IDProjectCategoryView StatusLast Update
0002556OpenFOAMBugpublic2018-02-07 11:08
ReporterSahas Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Summary0002556: Value is written twice for boundary condition fixedShearStress
DescriptionIn function Foam::fixedShearStressFvPatchVectorField::write(Ostream& os) keyword "value" is written both by fixedValueFvPatchVectorField::write(os) and by separate call, see code below (file src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C):

void Foam::fixedShearStressFvPatchVectorField::write(Ostream& os) const
{
    fixedValueFvPatchVectorField::write(os);
    os.writeKeyword("tau") << tau0_ << token::END_STATEMENT << nl;
    writeEntry("value", os); // <- this is redundant
}

Patch is attached.

Tagsboundary conditions

Relationships

has duplicate 0002737 closedhenry fixedShearStress: "Found duplicated entries with keyword value" 

Activities

Sahas

2017-05-18 16:27

reporter  

fixedShearStressFvPatchVectorField.patch (755 bytes)   
diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C
index 17050f2..1c05c12 100644
--- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C
+++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C
@@ -127,7 +127,6 @@ void Foam::fixedShearStressFvPatchVectorField::write(Ostream& os) const
 {
     fixedValueFvPatchVectorField::write(os);
     os.writeKeyword("tau") << tau0_ << token::END_STATEMENT << nl;
-    writeEntry("value", os);
 }
 
 

henry

2017-05-18 16:36

manager   ~0008160

I think the plan was to write the "tau" before the value entry so

void Foam::fixedShearStressFvPatchVectorField::write(Ostream& os) const
{
    fvPatchVectorField::write(os);
    os.writeKeyword("tau") << tau0_ << token::END_STATEMENT << nl;
    writeEntry("value", os);
}

would be better.

Sahas

2017-05-18 16:49

reporter   ~0008161

I agree with you.

henry

2017-05-18 19:59

manager   ~0008162

Resolved in OpenFOAM-4.x by commit bf3559e6be92019bc28c17fbbf7d37d5d0deea94

Resolved in OpenFOAM-dev by commit 4371e8504d25c5c75c47bf7a072e9a3c38c6ad1f

Issue History

Date Modified Username Field Change
2017-05-18 16:27 Sahas New Issue
2017-05-18 16:27 Sahas File Added: fixedShearStressFvPatchVectorField.patch
2017-05-18 16:27 Sahas Tag Attached: boundary conditions
2017-05-18 16:36 henry Note Added: 0008160
2017-05-18 16:49 Sahas Note Added: 0008161
2017-05-18 19:59 henry Assigned To => henry
2017-05-18 19:59 henry Status new => resolved
2017-05-18 19:59 henry Resolution open => fixed
2017-05-18 19:59 henry Fixed in Version => 4.x
2017-05-18 19:59 henry Note Added: 0008162
2017-10-24 13:27 henry Relationship added has duplicate 0002737