m (Forgot to add 1.7.x, which is very likelly to be acceptable.) |
|||
Line 1: | Line 1: | ||
− | + | Known to work with:<BR> | |
− | + | {{VersionInfo}}{{Version1.6-ext}}{{Version1.7.0}}{{Version1.7.1}}{{Version1.7.x}} | |
− | + | ||
− | + | ||
− | + | ||
− | {{VersionInfo | + | |
<BR> | <BR> | ||
+ | May also work with the latest version. Be the first to find out, and let me know. | ||
+ | <br> | ||
+ | <small>Subpage contents (alphabetical)<BR> | ||
+ | > [[Contrib_equationReader/Installation|Installation]]<BR> | ||
+ | > [[Contrib_equationReader/Installation|Programming]]<BR> | ||
+ | > [[Contrib_equationReader/Uninstallation|Uninstallation]]<BR> | ||
+ | > [[Contrib_equationReader/Using_equationReader|Using equationReader]]<BR></small> | ||
+ | <BR> | ||
+ | |||
== What is it? == | == What is it? == | ||
− | '''equationReader''' is an extension to [[OpenFOAM]] that allows you to | + | '''equationReader''' is an extension to [[OpenFOAM]] that allows you to work with user-entered equations. For example: |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
+ | U.x "sin(pi_ * t / 4)"; | ||
+ | U.y "rho * nut / L"; | ||
+ | U.z 0; | ||
+ | nu nu [0 2 -1 0 0 0 0] "1.2 + 3 * alpha^sin(pi_/6)"; | ||
+ | aScalar "nu / max(5, alpha)"; | ||
+ | alpha 1.3; | ||
+ | |||
== Features == | == Features == | ||
+ | * '''Works with most fields''' - Now works with ''single elements'', ''fields'', and ''GeometricFields''; | ||
+ | * '''Works with most Types''' - Now works with ''scalars'', ''vectors'', and all kinds of ''tensors''; | ||
+ | * '''Flexible data sources''' - In addition to these types, equations can also lookup values from ''dictionaries'', and you can create an ''activeVariable'' that derives its value on-the-fly. | ||
* '''Order of operations''' - it is fully compliant with the conventional order of operations to an arbitrary parenthesis depth; | * '''Order of operations''' - it is fully compliant with the conventional order of operations to an arbitrary parenthesis depth; | ||
− | |||
− | |||
* '''Equation dependency tracking''' - equations can depend on one another to an arbitrary hierarchy depth; | * '''Equation dependency tracking''' - equations can depend on one another to an arbitrary hierarchy depth; | ||
* '''Circular-reference detection''' - it will halt computations when a circular reference is detected; | * '''Circular-reference detection''' - it will halt computations when a circular reference is detected; | ||
− | * '''On-the-fly equation mapping''' - it will automatically perform substitution on other equations when they are needed, even if they aren't specifically called for in the solver; | + | * '''On-the-fly equation mapping''' - it will automatically perform substitution on other equations when they are needed, even if they aren't specifically called for in the solver; and |
− | * '''Dimension-checking''' - fully utilizes [[OpenFOAM]]'s built-in dimension-checking, or you can force the outcome to a specific dimension-set to quickly disable it (if you are lazy) | + | * '''Dimension-checking''' - fully utilizes [[OpenFOAM]]'s built-in dimension-checking, or you can force the outcome to a specific dimension-set to quickly disable it (if you are lazy). |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | '''Limitations:''' Although '''equationReader''' works with all Types, at its core, it is just a ''scalar'' calculator with ''dimensions''. Therefore, you can't use vector operators, let alone tensor operators. Each equation must be expressed in scalar components. | |
− | + | == Why would you need this? == | |
+ | Let the user define their own equations - this makes your application '''more user-friendly''', and '''more flexible'''. But don't reinvent the wheel - if you are only working with ''boundary conditions'' or ''initial conditions'', Bernhard's [[Contrib/swak4Foam|swak4Foam]] would probably be more suitable. | ||
− | === | + | == Learn more == |
− | + | ||
− | + | * ''I'm sold, let me install it!'' - Check out the [[Contrib_equationReader/Installation|installation sub-page]]. | |
− | + | * ''I'm a user, how do I format my equations?'' - Check out the [[Contrib_equationReader/Using_equationReader|user's guide sub-page]]. | |
− | + | * ''I'm a developer, how do I use '''equationReader'''?'' - Check out the [[Contrib_equationReader/Programming|programmer's guide sub-page]]. | |
− | + | * ''I've had enough, how do I uninstall it?'' - Check out the [[Contrib_equationReader/Uninstallation|Uninstallation sub-page]]. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | * ''' | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | [[Contrib_equationReader/ | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | * ''' | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | * | + | |
− | + | ||
− | + | ||
− | + | ||
− | ''' | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
== Update info == | == Update info == | ||
Line 273: | Line 57: | ||
** Added a fieldEvaluate function for active equations whose output is to a scalar field. | ** Added a fieldEvaluate function for active equations whose output is to a scalar field. | ||
** Bug fix to get it working with 1.6-ext and higher. | ** Bug fix to get it working with 1.6-ext and higher. | ||
− | + | *''2011-09-13:'' Major upgrade | |
− | + | ** ''''Now a stand-alone library''''. | |
+ | ** Now works with ''''vectors and tensors'''': | ||
+ | *** scalar; | ||
+ | *** vector; | ||
+ | *** tensor; | ||
+ | *** diagTensor; | ||
+ | *** symmTensor; and | ||
+ | *** sphericalTensor. | ||
+ | ** ''''Now works with GeometricFields''' | ||
+ | ** Dimension checking is now performed separately, improving efficiency of field and GeometricField calculations. | ||
+ | * Interface changes: | ||
+ | ** Add data functions reorganized / changed. | ||
+ | ** Evaluate functions reorganized / changed. | ||
+ | ** Update functions removed. | ||
+ | |||
+ | --[[User:Marupio|Marupio]] 21:42, 14 September 2011 (CEST) |
Revision as of 19:42, 14 September 2011
Known to work with:
Valid versions:
May also work with the latest version. Be the first to find out, and let me know.
Subpage contents (alphabetical)
> Installation
> Programming
> Uninstallation
> Using equationReader
1 What is it?
equationReader is an extension to OpenFOAM that allows you to work with user-entered equations. For example:
U.x "sin(pi_ * t / 4)"; U.y "rho * nut / L"; U.z 0; nu nu [0 2 -1 0 0 0 0] "1.2 + 3 * alpha^sin(pi_/6)"; aScalar "nu / max(5, alpha)"; alpha 1.3;
2 Features
- Works with most fields - Now works with single elements, fields, and GeometricFields;
- Works with most Types - Now works with scalars, vectors, and all kinds of tensors;
- Flexible data sources - In addition to these types, equations can also lookup values from dictionaries, and you can create an activeVariable that derives its value on-the-fly.
- Order of operations - it is fully compliant with the conventional order of operations to an arbitrary parenthesis depth;
- Equation dependency tracking - equations can depend on one another to an arbitrary hierarchy depth;
- Circular-reference detection - it will halt computations when a circular reference is detected;
- On-the-fly equation mapping - it will automatically perform substitution on other equations when they are needed, even if they aren't specifically called for in the solver; and
- Dimension-checking - fully utilizes OpenFOAM's built-in dimension-checking, or you can force the outcome to a specific dimension-set to quickly disable it (if you are lazy).
Limitations: Although equationReader works with all Types, at its core, it is just a scalar calculator with dimensions. Therefore, you can't use vector operators, let alone tensor operators. Each equation must be expressed in scalar components.
3 Why would you need this?
Let the user define their own equations - this makes your application more user-friendly, and more flexible. But don't reinvent the wheel - if you are only working with boundary conditions or initial conditions, Bernhard's swak4Foam would probably be more suitable.
4 Learn more
- I'm sold, let me install it! - Check out the installation sub-page.
- I'm a user, how do I format my equations? - Check out the user's guide sub-page.
- I'm a developer, how do I use equationReader? - Check out the programmer's guide sub-page.
- I've had enough, how do I uninstall it? - Check out the Uninstallation sub-page.
5 Update info
- 2010-07-21: Initial release
- 2010-08-05: Bug-fix - differentiated versions for OpenFOAM-1.5.x/1.5-dev and OpenFOAM-1.6.x+
- 2010-08-12: Major upgrade
- Introducing IOEquationReader - EquationReader is now an IOobject<tt>. This enables automatic output
- Added support for <tt>scalarList data sources - including scalarField<tt>, <tt>volScalarField, etc.
- Removed the need for pointers for data sources
- Cleaned up available functions
- 2010-10-16: Bug fixes and added full support for fields
- 2011-04-06: Major upgrade
- Efficiency improvement - pointer functions have been implemented to increase computation speed by an order of magnitude (at least).
- Improved dimension-checking on all functions.
- Added a fieldEvaluate function for active equations whose output is to a scalar field.
- Bug fix to get it working with 1.6-ext and higher.
- 2011-09-13: Major upgrade
- 'Now a stand-alone library'.
- Now works with 'vectors and tensors':
- scalar;
- vector;
- tensor;
- diagTensor;
- symmTensor; and
- sphericalTensor.
- 'Now works with GeometricFields
- Dimension checking is now performed separately, improving efficiency of field and GeometricField calculations.
- Interface changes:
- Add data functions reorganized / changed.
- Evaluate functions reorganized / changed.
- Update functions removed.
--Marupio 21:42, 14 September 2011 (CEST)