PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS...

35
PHOENICS Tomorrow PHOENICS User Meeting 2006 PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS, data were input via text files (Q1s) written in PIL (PHOENICS Input Language). PIL had (and has) many valuable features: (new-variable declaration, logic, DO loops, CASE structures, file reading, etc; but not all users found it easy. Therefore menu-type input procedures were introduced, for users who did not know PIL, so as to write Q1s for them.

Transcript of PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS...

Page 1: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

PRELUDENew PHOENICS pre-processor

• Why does PHOENICS need a new pre-processor?

• In the first years of PHOENICS, data were input via text files (Q1s) written in PIL (PHOENICS Input Language).

• PIL had (and has) many valuable features: (new-variable declaration, logic, DO loops, CASE structures, file reading, etc; but not all users found it easy.

• Therefore menu-type input procedures were introduced, for users who did not know PIL, so as to write Q1s for them.

Page 2: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

Losses as well as gains

• Much good was done, e.g.-- visual display and manipulation;-- attention focussed on objects.-- use of x, y, z, rather than ix, iy, iz; * But much was lost also, namely:-- declarations,-- logic,-- case structures, etc.This need not have been so, we can now

recognise; but hindsight is easy.

Page 3: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

Resulting shortcomings

• Consequently the Q1 written by the VR-editor defines adequately the data needed for a single solver run.

• However, the Q1 contains no record of the class of runs of which it was a single instance.

• PRELUDE has been introduced as a means of preserving and enriching that record.

Page 4: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

Other motives

• It has also been said that the VR-Editor ‘looks old-fashioned’.

• Perhaps that is because some dialogue boxes are indeed old. Do they betray their Fortran basis?

• PRELUDE does have a more modern appearance; but achieving it has not been a high-priority aim (rightly?).

• More important is that PRELUDE looks (and acts) the same under both Windows and Unix/Linux.

Page 5: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

Relation of PRELUDE to Satellite

• PRELUDE and Satellite work in tandem.

• PRELUDE passes its output to Satellite in the form of a Q1 file, which

• Satellite then converts into eardat and facetdat and passes to the solver for execution.

Page 6: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

PRELUDE as environment

• The activation of Satellite, Solver and Viewer is achieved from within PRELUDE, which thereby acts as an environment.

• It may itself have been activated from the Commander, in its role of 'outer environment'.

• Interactive users of the Satellite can, if they wish, modify the data on its way to the solver, by way of the VR-Editor.

Page 7: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

main features

of PRELUDE, 1

PRELUDE processes input data provided by one or more of the following:

• a single-instance Q1 file, • a multiple-instance Q3 file, • a script containing human-editable

commands, • input, especially of data relationships,

provided interactively by the user. • .dat files defining shapes, • .ac files created by AC3D, • .stl files • .pob files

Page 8: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

main features, 2

• PRELUDE allows relationships to be typed into boxes, whereafter they are acted upon instantly.

• This is probably the most important of all the features of PRELUDE.

• Its relational character distinguishes it from Satellite in the same way as an EXCEL spread-sheet is distinguished from an palm-top calculator.

• Does any competing code possess this?

Page 9: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

Further features

• PRELUDE can launch a series of PHOENICS runs, with different values of specified parameters, and access the results in an orderly way.

• PRELUDE treats 'phi-variables' as objects having attributes, in a manner similar to physical objects (except that they have no visual representation).

• PRELUDE also treats as objects 'models' such as IMMERSOL, k-epsilon, and solid-stress, which appear on the 'object-tree as children of the 'domain' object and as parents of their associated 'phis'.

Page 10: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

Relationships exemplified

Page 11: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

Main features, 3

• PRELUDE can record the results of an interactive-input session in the form of a Q3 file, which, because it preserves the algebraically-expressed relationships between the data elements, can be used for the creation of an unlimited number of individual-instance simulations.

• PRELUDE has 'undo' capabilities.

Page 12: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

Who will use PRELUDE ? 1

• Users of the Gateway approach to PHOENICS (i.e. the ‘goal-scorers’)

• Gateways allow users to perform simulations of pre-defined kinds, with the minimum of difficulty.

• Such users are presented with all that they need, but no more.

• They are not required to make CFD-specific decisions.

Page 13: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

Who will use PRELUDE ? 2

• The makers of Gateways (i.e. mid-field players) usually:

-- consultants, for their clients, -- lecturers, for their students,-- CHAM and CHAM-J staff, for

selected application sectors,-- the company PHOENICS expert,

for his ‘coal-face’ colleagues.

Page 14: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

What is a gateway?

• A Gateway consists of: • a script which sets up an initial scenario; • a 'store-cupboard' containing a set of

objects with attributes which the user is is expected to need ;

• a script embodying a tutorial which enables the new user to learn what to do;

• some exemplary Q3s.

Page 15: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

What is a Q3?

• It is a kind of generalised Q1, embodying classes, of cases, not just single instances.

• It preserves declared variables.• It preserves relationships.• Although often created and

modified interactively, it is human-editable.

Page 16: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

What is a PRELUDE script?

• It is a file written in Tcl/Tk, with extensions introduced by CHAM, which tell PRELUDE what to do.

• It acts like a ‘macro’ of PRELUDE-user key-board entries.

• It is NOT for the general user (either ‘forward’ of ‘mid-field’); but CHAM could offer training in script-writing.

Page 17: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

More about Gateways

• Gateways are much easier to create than special-purpose programs.

• Three which are now being finalised are:

-- The Virtual Wind Tunnel-- Heating, Ventilating and Air-

conditioning-- Fire, and smoke movement.

Page 18: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

PRELUDE demonstrated

G W MichelCHAM

© 2006

Page 19: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

Prelude

• Next generation editor for PHOENICS• Relationships specified mathematically• IN-Form creation of boundary conditions,

buoyancy etc.• More object formats are supported• User writable script extensions• Undo/Redo for most features.• Prompt to save on exit if any parameter

has been changed.

Page 20: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

Relationships

• Parameters are defined as functions of other properties

• Parameters include position, size, rotation of objects, and user variables.

• Checks formulae for type of result (2.4 is not an integer)

Page 21: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

In-Form BCs

• Functions can be specified as functions of coordinates and other parameters

• EG parabolic velocity at inlet with a single inlet object

Page 22: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

As Seen in PRELUDE

• Prelude defines the inform statements as text

• EARTH interprets the statements

• Prelude saves and restores the statements and can add new statements.

Page 23: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

Formats beyond .dat

• Other file formats are supported by the OpenSceneGraph graphics engine.

• EG .3ds model of a watch with texture (it’s about time…)

Page 24: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

Parametric Objects

• Defined using Tcl script (which can be created by the end user or a consultant)

• Example: a baffle with a cutout area. Shape parameters are radius, cutout depth, length and number of facets.

Page 25: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

Parametric Baffle

• Adjusting the parameters such as ‘cutout’ and ‘length’

• changes the shape without editing and saving a geometry file

Page 26: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

Tree Model of Scene

• A Scenegraph is used to optimise performance and achieve hierarchical graphics.

• The table, plus chair and computer is a single assembly but PHOENICS can set separate properties for each component.

Page 27: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

Hierarchical Table

• Rotate the assembly (table) and all the other parts remain at the same relative positions.

• Position in PHOENICS handled automatically by PRELUDE.

Page 28: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

Textured Objects

• Can use ac3d to generate textured objects.

• Or other data sources - here the OSG format sample of a cow….

Page 29: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

Using other objects

• The Cow is passed to EARTH and flow around the cow in a virtual wind tunnel solved.

Page 30: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

Architecture

• Very complex models can be imported into Prelude and exported to EARTH - PARSOL does its best to fit.

• 46982 vertices• 23208 facets

Page 31: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

Results around House

• Very hard to mesh due to open windows, but PARSOL gives this result in less than 4 minutes on a 2GHz PC.

Page 32: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

Multiple runs

• PRELUDE can perform multiple runs, varying a parameter on each run.

• Here an airfoil is placed in the VWT and its incidence changed from -15 to 5 degrees.

Page 33: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

Results of Incidence

• After about 5 minutes CPU, I achieved the 5 runs displayed here. (incidence --15,-10,-5,0,5 degrees)

• The scales of pressure are not identical in the examples.

Page 34: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

Summary

• PRELUDE is the latest tool for access to PHOENICS features

• Users and consultants can produce special purpose ‘gateways’ to enable clients to access the features they need with maximum ease and reliability.

Page 35: PHOENICS User Meeting 2006 PHOENICS Tomorrow PRELUDE New PHOENICS pre-processor Why does PHOENICS need a new pre- processor? In the first years of PHOENICS,

PHOENICS Tomorrow

PH

OE

NIC

S U

ser

Mee

tin

g 2

006

Future for PRELUDE

• Add a rigid body dynamics code to provide inputs to MOFOR

• Improved access to DWG, DXF or other CAD formats (please tell us your requirements)

• Display of results in the PRELUDE graphics scene.