|
[Sponsors] |
September 8, 2013, 15:02 |
and OF-2.2.1
|
#1 |
Member
India
Join Date: Oct 2012
Posts: 84
Rep Power: 13 |
Hi Foamers,
I recently switched from OF-2.1.1 to OF-2.2.1. I installed swak4Foam it compiled fine which was checked by re-running ./Allwmake command which returned the list of libraries. Now I ran a simple steady state simulation using swak Data entry and encountered errors which were not there in OF-2.1.1. Below is 0/U file: where I implemented swakDataEntry. Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { INLET { type groovyBC; variables "r2=(pow(pos().x,2)+pow(pos().y,2));R2=sum(area())/pi;para=-((R2-r2)/R2)*normal();"; valueExpression "2*0.0852*para"; //where 0.351 is the average velocity value uniform (0 0 0); } PART_1 { type fixedValue; value uniform (0 0 0); } OUTLET1 { type flowRateInletVelocity; volumetricFlowRateExpression "0"; volumetricFlowRate swak { variables "phi1{INLET}=-0.502*sum(area())*0.0852;"; expression "phi1"; // volume flow going out of domain from outlet 1 which 0.52 times that at inlet valueType patch; patchName OUTLET1;}; value uniform ( 0 0 0 ); } OUTLET2 { type zeroGradient; } } Create mesh for time = 0 Reading field p Reading field U --> FOAM FATAL IO ERROR: keyword independentVariableName is undefined in dictionary "" file: from line 47 to line 50. From function dictionary::lookupEntry(const word&, bool, bool) const in file db/dictionary/dictionary.C at line 402. FOAM exiting |
|
September 8, 2013, 18:03 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Code:
**** =swakDataEntry= improved Two enhancements - the name of the independent variable no can be specified. This variable holds the value that is passed to the data entry as a uniform value - data entry can now be integrated. This allows using it for instance for the injection rate in lagrangian models Code:
** Data entry The main library introduces a subtype of =DataEntry= that is selected under the name =swak= wherever data entries lie =constant=, =polynomial= etc are used. After that a dictionary with additional parameters is required. An example entry would look like this: : flowRateProfile swak { : expression "exp(-t)"; : independentVariableName t; : valueType patch; : patchName top; : integrationIntervalls 100; : }; Required entries in the dictionary are - expression :: the expression to be evaluated - independentVariableName :: the name of the independent variable that was passed during evaluation (usually this is the time) - valueType :: this determines the type of parser that is used. Additional parameters for the initialization may be needed and the usual entries like =variables= are of course possible Only for integrations an additional parameter is needed - integrationIntervalls :: number of intervals the integration range is divided into.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
|
|