Commit Graph

5 Commits

Author SHA1 Message Date
4cbb849eda codedFixedValueFvPatchField: Updated and simplified using the new CodedBase class
reducing code duplication and maintenance overhead.
2020-02-06 16:04:21 +00:00
963392e86c CodedBase: New template wrapper to provide most of the members needed by codedBase
This significantly simplifies the creation and maintenance of coded classes and
used in CodedFunction1 to provide an example of its use; the other coded classes
will be refactored and simplified in this manner in the future.
2020-02-02 18:17:31 +00:00
617695fef4 CodedFunction1: Resolved problem with operator order in the description string construction 2020-02-01 17:50:01 +00:00
dbdc119309 CodedFunction1: Updated documentation 2020-02-01 17:00:35 +00:00
0dd2e97bd8 CodedFunction1: New Function1 which uses codeStream to dynamically compile the value function code
For example in the new tutorial case:
tutorials/incompressible/pimpleFoam/laminar/pitzDailyPulse
a cosine bell velocity pulse is specified at the inlet by directly defining the
code for it:

    inlet
    {
        type            uniformFixedValue;
        uniformValue    coded;

        name            pulse;

        codeInclude
        #{
            #include "mathematicalConstants.H"
        #};

        code
        #{
            return vector
            (
                0.5*(1 - cos(constant::mathematical::twoPi*min(x/0.3, 1))),
                0,
                0
            );
        #};
    }

which is then compiled automatically and linked into the running pimpleFoam
dynamically and executed to set the inlet velocity.
2020-01-31 23:39:59 +00:00