CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   CFX 5 input file? (https://www.cfd-online.com/Forums/cfx/19110-cfx-5-input-file.html)

jvk August 6, 2002 09:54

CFX 5 input file?
 
Hi,

Is it possible to make use of an input-file which can read Build? This would be very convenient when changing parameters such as lengths or so.

Regards,

Jaap

Robin August 6, 2002 14:01

Re: CFX 5 input file?
 
Hi Jaap,

All Build sessions are written to a session file, plus a journal file (.db.jou) is written for each database. You can play back a session file to execute a series of actions, or a journal file to recreate an entire model. These are simple text files, so it is possible for you to edit these to create parametric models.

Build is based on MSC.Patran, thus the command language is known as Patran Command Language (PCL). Every Build action has a corresponding PCL code (echoed in the History window). If you want to know what the corresponding PCL command is, have a look at the history window or read through your session or journal file. It is also possible to create your own gui elements, menu's etc., using PCL.

If necessary, you can download the PCL manuals from the CFX community pages, or by contacting customer support.

Regards, Robin

jvk August 8, 2002 06:55

Re: CFX 5 input file?
 
Thank you Robin,

One more question: how do I declare variables in the journal-file. I tried to create them using the Expression Editior to create a value. However, when defining my geometry, I cannot use these values for Build doesn't recognize them. Do you have a solution?

Regards, Jaap

Robin August 8, 2002 09:01

Re: CFX 5 input file?
 
Hi JVK,

Variables and expressions in the Expression Editor are CFX Expression Language (CEL) components and are evaluated by the solver. Build only provides a means of entering these expressions. They are not evaluated by Build, except for using the "Calculate" or "Plot" functions in the expression editor.

If you wish to use expressions and variables in Build to create geometry, you can declare them using the Patran Command Language (PCL). For instance, if you wanted to declare a set of REAL variables named length , width , and height, you would do the following:

REAL length, width, height

length = 10.0 width = 5.8 height =2.3

You could then use these to define geometry in Build. To use a variable or expression in a form, delimeter it with a backward quote `. For instance, to use our variables to define a vector, you would write the vector like this:

<`length` `width` `height`>

which equates to

<10 5.8 2.3>

Or perhaps you want to use a function of one of these variables to define a point location:

[ 0 `2*width` 0]

which equates to

[0 11.6 0]

This is only scratching the surface. I highly recommend dowmloading a copy of the PCL documentation from the community pages to learn more about PCL. The files are downloadable from the here on the CFX Community Pages. If you are a CFX user (including students) and you do not have a community pages password, fill out the on-line form to get one at http://www.software.aeat.com/cfxcommunity/.

Best regards, Robin



All times are GMT -4. The time now is 02:38.