View Issue Details

IDProjectCategoryView StatusLast Update
0003626OpenFOAMBugpublic2021-02-12 09:46
Reporterdscian Assigned Towill  
PrioritylowSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Versiondev 
Summary0003626: Search for alphac as volVectorField in DenseDragForce
Descriptionin cacheFields() function of DenseDragForce, there is a search for alphac as volVectorField, causing it to never be found. (Line 90, DenseDragForce.C)
TagsNo tags attached.

Activities

will

2021-02-12 08:36

manager   ~0011873

Last edited: 2021-02-12 08:36

Tutorials with dense drag models are operating correctly, as far as I can see.

Please provide some way of reproducing the problem. See https://bugs.openfoam.org/rules.php : "An issue report therefore must include the following: ... A clear set of instructions that reproduces the issue, including key files, if required.".

dscian

2021-02-12 09:34

reporter   ~0011874

Apologize for opening the report as a bug because this is trivial. It does not affect the outcome since alphac is looked up afterwards independent of this if statement. It's just that the if statement will always be running because alphac is not a volVectorField, and the computation for "this->owner().theta()" is redundant. I couldn't also see where else alphacPtr_ is used.

To reproduce the issue, I tested it by placing "Info <<" statement inside the if statement with volVectorField and volScalarField in line 90. volScalarField skips the if statement.

will

2021-02-12 09:41

manager   ~0011875

Apologies. Yes I see the issue now. You are correct. It should be volScalarField. It doesn't cause an error, because the lookup failure just means the field gets re-generated, but it is missing a potential optimisation.

Fixed in dev by the following commit.

https://github.com/OpenFOAM/OpenFOAM-dev/commit/0f04dd04c6b0eacf92ec77ae3e2bbeb20cf54f5c

will

2021-02-12 09:45

manager   ~0011876

And fixed in 8 by:

https://github.com/OpenFOAM/OpenFOAM-8/commit/0f3c9c49f485f0d127ffaebf622a0a5f330d326b

Issue History

Date Modified Username Field Change
2021-02-12 02:30 dscian New Issue
2021-02-12 08:36 will Note Added: 0011873
2021-02-12 08:36 will Note Edited: 0011873
2021-02-12 08:36 will Note Edited: 0011873
2021-02-12 09:34 dscian Note Added: 0011874
2021-02-12 09:41 will Assigned To => will
2021-02-12 09:41 will Status new => resolved
2021-02-12 09:41 will Resolution open => fixed
2021-02-12 09:41 will Fixed in Version => dev
2021-02-12 09:41 will Note Added: 0011875
2021-02-12 09:45 will Note Added: 0011876
2021-02-12 09:45 will Product Version dev => 8
2021-02-12 09:46 will Product Version 8 => dev
2021-02-12 09:46 will Fixed in Version dev => 8