CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Parametrization (https://www.cfd-online.com/Forums/cfx/19424-parametrization.html)

Stex January 15, 2003 06:18

Parametrization
 
I created 2 variables for example x1=0.1 and y1 = 0.2

How can I create a point ( for example "1" ) which has coordinates x1,y1 ?

Holidays January 15, 2003 08:15

Re: Parametrization
 
[`x1`,`y1`,0]

This is usually shown during CFX training courses and is probably avaible on-line as well. Alternatively you could also find more detail on this topic in patran/nastran notes oor books.

stex January 15, 2003 11:55

Re: Parametrization
 
It doesn't works!!!! so i try with [x1,y1,0] but x1,y1 seems to be not defined ( cfx create a point which has [0 0 0] coordinates )

How can i create a costant for example Lar1 = 0.945 and then a point [Lar1 , 0 ,0] ?? Maybe from tools-> Expression editor.......

thanks


Holidays January 16, 2003 02:23

Re: Parametrization
 
If you have set this up well, what I described does work!

Have you set

REAL x1 = 1.0 etc.

to start with?

stex January 16, 2003 13:01

Re: Parametrization
 
Thank you Holidays, I don't know why all the things I tryed don't work. I try with:

REAL alt1

alt1 = 0.12

and then I put in Geometry (to create a pont)

[alt1, 0, 0]

and cfx-build create a point at [0 0 0].

Please send me a simple example here or at my e-mail:

stexpieri@libero.it

many thanks

Holidays January 17, 2003 02:28

Re: Parametrization
 
Hi Stex,

You're still NOT doing what I describe earlier; hence your difficulties. Here is a piece of journal file proving it does work (note that this can be taken a lot further with Perl for example if you decide to write the value for your parameters with a Perl script, eg as a function of previous calculation on the same case post-processed in Post):

$# CFX-Build Database Release Number: 5.5.1(31st-May-2002) INTEGER cfx5_mesh_mode_set_istat cfx5_set_mesh_mode( "AFI", cfx5_mesh_mode_set_istat ) $# Surface mesh mode not found in database: setting to Delaunay. cfx5_set_surf_mesh_mode( "DELAUNAY", cfx5_mesh_mode_set_istat ) cfx5_set_units_geom( "m" ) db_set_pref( 303, 3, 0, FALSE, 0.0049999999, "" ) REAL x1 = 0.25 STRING asm_create_grid_xyz_created_ids[VIRTUAL] asm_const_grid_xyz( "1", "[`x1` 0 0]", "Coord 0", @ asm_create_grid_xyz_created_ids ) $# 1 Point created: Point 1 $# Stop the Physics Validator server... $# Journal file stopped recording at 17-Jan-03 08:15:34

Bob January 17, 2003 06:08

Re: Parametrization
 
Holidays, do you use the PCL much for creating geometry ? Do you create a session file using Perl first, outside of build, then play the session file, or just use the in built patran language ? whats the advantages of using Perl over PCL ? Bob

Stex January 17, 2003 07:37

Re: Parametrization
 
Thank you Holidays

I can't belive that my problems were connected to the fact that I have the key " ' " and not " ` " on my keyboard !!!!

Now the last thing that doesn't work is the use of the functions like atan , asin....etc.There is a special key??

for example

REAL rapp = 0.14

REAL alfa = atan(rapp)

doesn't work

help me please!


Holidays January 17, 2003 08:32

Re: Parametrization
 
Hi Bob,

I use both.

When I want a simply parameterised geometry I go directly with PCL. In fact I will most often write the underlying PCL and then, when necessary, set the values of the constant in the PCL via a Perl script. That will give me flexibility in terms of usage of the one PCL I initially wrote.

You can also have a Perl script write the whole PCL. This happens if you have complex "conditions" (IF, etc.); even if I know I could do the same in PCL I find it easier in Perl.

It works well.

PS Similarly you can then write the whole CCL in Perl, and the cse file in Post and automate the whole run. Neat!

Bob January 20, 2003 10:00

Re: Parametrization
 
Cheers Holidays I'll have to have a play with the PCL more and learn how to take advantage of it. Bob

Holidays January 21, 2003 06:59

Re: Parametrization
 
You can check out Patran/Nastran language books as well.


All times are GMT -4. The time now is 01:49.