Manufacturing Solutions

Specifying Functions

Specifying Functions

Previous topic Next topic No expanding text in this topic  

Specifying Functions

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

The RTM solver allows you to input preform properties and boundary conditions as a function of space and time.  This is done using the FUNCTIONS block. The function can be an expression, a one-dimensional table, or a two-dimensional table.

Syntax


BEGIN FUNCTIONS
     Function_Type   Variable { Expression/Data }
END

 

Comments


Valid entries for Function_Type are: CONSTANT, TABLE1, and EXPRESSION.  The variable is the name of the data field represented as a function.  The expression denotes algebraic expression used to compute the variable.  The data denotes the tabular data used to compute the variable.  Examples of syntax for the function types are provided below.

 

Example 1: Table 1

BEGIN FUNCTIONS

TABLE1 gate_p { LINEAR

0.0  1.0E+05

0.2  2.0E+05

1.0 3.0E+05

}

END

 

BEGIN BOUNDARY

InjectorBC inlet  {

PortLocation    = 0.5 0.5 0.0

Pressure        = gate_p

ResinSaturation = 1.0

}
END

 

Here injection pressure is specified in the form TABLE1.
 

Example 2: Expression


This tcl procedure should be sourced from  the driving tcl file. For example, this procedure is saved in a file called gate_p.tcl.

Contents of gate_p.tcl

proc gate_pressure {t} {

set Time 0.2

set pi2 [expr asin(1.00)]

set MaxP 1.0E+05

set MinP 5.0E+04

set Diff [expr $MaxP - $MinP]

set value [expr $MinP + $Diff*sin($t*$pi2/$Time)]

return $value

}

Now the driving tcl file should have its first line as

 

source gate_p.tcl

 

and in the grf file is

 

BEGIN FUNCTIONS

EXPRESSION gate_p "{t} { gate_pressure $t }"

END

BEGIN BOUNDARY

   InjectorBC inlet  {

PortLocation = 0.5 0.5 0.0

Pressure=gate_p

ResinSaturation = 1.0

}

END
 

This will make the code use a function for computing injection pressure.