Using embedded Perl to Generate CEL expressions.


How can I generate a large number of similar CEL expressions in CFX 11.0? I don't want to do this by hand as it is error prone and laborious.


Embedded Perl (power syntax) can be used to generate CEL expressions. This can be useful where a large number of similar expressions need to be generated. Using embedded Perl avoids repetition, thus making the set up of some simulations less error prone and less laborious.

The attached zip archive file contains an example (including detailed README) showing how to use CEL step functions to set the value of the additional variable to 1 in certain regions and 0 elsewhere. This approach is useful when setting sources (e.g. a resistance source) which is to be active in certain regions only and where it is not feasible to model these regions explicitly as subdomains. Where many regions are to be represented, this is an ideal candidate for embedded Perl.

The use of embedded Perl in this way can be extended to any application where a large number of similar expressions is required.

Show Form
No comments yet. Be the first to add a comment!