View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002427 | OpenFOAM | [All Projects] Bug | public | 2017-01-09 14:53 | 2017-01-13 14:26 |
Reporter | zhulianhua | Assigned To | henry | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | GNU/Linux | OS | Ubuntu | OS Version | 14.04 |
Product Version | |||||
Fixed in Version | dev | ||||
Summary | 0002427: Description in the header file $FOAM_SRC/fvOptions/sources/general/codedSource/codedSource.H is incorrect. | ||||
Description | Both the `fieldNames' entry and the ''' sourceTimeCoeffs { // Dummy entry } ''' are not correct. | ||||
Steps To Reproduce | Attached is a case using the `vectorCodeSource' type fvOption to apply an external force to drive the channel flow. The `control/fvOptions' are written according to the above-mentioned header file. Run the case using simpleFoam. The error would be: keyword name is undefined in dictionary "/home/lhzhu/OpenFOAM/lhzhu-4.1/run/channel_external_force_bug/constant/fvOptions.externalForce" | ||||
Additional Information | This header file description has not been corrected yet in OpenFOAM-dev also. I've attached a corrected version of the `constant/fvOptions' independently. | ||||
Tags | fvOptions | ||||
|
fvOptions (1,580 bytes)
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object fvOptions; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // externalForce { type vectorCodedSource; active yes; name sourceTime; vectorCodedSourceCoeffs { selectionMode all; fields (U); codeInclude #{ #}; codeCorrect #{ Pout<< "**codeCorrect**" << endl; #}; codeAddSup #{ vectorField& USource = eqn.source(); const scalarField& V = mesh_.V(); vector force(1.0, 0, 0); USource -= force*V; #}; codeSetValue #{ Pout<< "**codeSetValue**" << endl; #}; // Dummy entry. Make dependent on above to trigger recompilation code #{ $codeInclude $codeCorrect $codeAddSup $codeSetValue #}; } sourceTimeCoeffs { $vectorCodedSourceCoeffs; } } // ************************************************************************* // |
|
channel_external_force_bug.tar.gz (105,053 bytes) |
|
Could you provide an updated codedSource.H file including the additional entries in the documentation needed? |
|
Attached please find the updated CodeSource.H with corrected documentation. CodedSource.H (5,972 bytes) |
|
Thanks for the patch. Resolved in OpenFOAM-dev by commit 03362483db760099343e87123d4d9411c5407d6f |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-01-09 14:53 | zhulianhua | New Issue | |
2017-01-09 14:53 | zhulianhua | File Added: fvOptions | |
2017-01-09 14:53 | zhulianhua | Tag Attached: fvOptions | |
2017-01-09 14:53 | zhulianhua | File Added: channel_external_force_bug.tar.gz | |
2017-01-11 09:21 | henry | Note Added: 0007619 | |
2017-01-11 10:09 | zhulianhua | File Added: CodedSource.H | |
2017-01-11 10:09 | zhulianhua | Note Added: 0007621 | |
2017-01-13 14:26 | henry | Assigned To | => henry |
2017-01-13 14:26 | henry | Status | new => resolved |
2017-01-13 14:26 | henry | Resolution | open => fixed |
2017-01-13 14:26 | henry | Fixed in Version | => dev |
2017-01-13 14:26 | henry | Note Added: 0007632 |