ansys via scripts - cerngarfieldpp.web.cern.ch/.../examples/gem/fem_gem_part2.pdf · 2018. 3....

Post on 25-Feb-2021

4 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Ansys via scripts

Although perfectly possible, running Ansys via the GUI is not possibly less than perfect:

not easy to send a model to a friend;laborious to make small modifications;picking areas requires training;difficult to ensure reproducibility.

For the GEM, we'll use a script instead.The GUI is useful to get a skeleton script:See what you have done:  File  List  Log File ...

Good ideas:/CLEAR at the start;mouse­copy & paste from an editor into the Ansys command window;restart regularly.

Format conventions:! comment;/command: higher level;case insensitive;comma­separated keywords.

Exercise:try an inner radius of 0.0100 and understand why this fails.

Making a GEMStrategy:

initialisation;define materials;define parameters;identify smallest unit;construct the GEM sheet:

assemble a copper­polyimide­copper sheet;assemble a drill;subtract;

construct the gas volume:start with a gas volume that occupies the entire unit;subtract the GEM sheet;

eliminate double boundaries;associate a material description with every part;assign boundary conditions;mesh the problem domain;solve;export solution;

GEM – initialisation

Commands:

You'll be asked to confirm you really want to delete everything you've done sofar.

Reset

No elements Garfield can't handle

We're doing electromagnetics

Curved parabolic tetrahedra

GEM – materials

Commands:

RSVX: resistivityPERX: dielectric constant

GEM – parameters

Commands:

This is what makes scripts superior to GUI input. Ansys also has loops and conditional statements.

GEM – unit cell

Modeling more than ½ hole would be a waste !

GEM – building blocks

Commands:

Note the volume numbers – we will need them:

Command descriptions

Ansys has a built­in help facility.

Click: Help  Help topics, a new window opens, go there; Click: Mechanical APDL   Command Reference   PREP7 Commands

If this is too cumbersome:                                                        http://www.kxcad.net/ansys/ANSYS/ansyshelp/Hlp_C_CmdTOC.html     

Beware ... use exclusively the dark blue underlined links.This documentation is for Ansys version 11, but the differenceswith version 12 are not significant for our purposes.

GEM – making a drill bit

Commands:

Viewing just the piece:vsel,s,,,9vplot

beware of the side­effects !

GEM – second cut­out

Commands:

Viewing both pieces:vsel,s,,,9,10vplot

Do not forget to reselect all other relevant volumes !

GEM – drilling

Commands:

To visualise:vsel,s,,,1,3 vsel,s,,,5vplot vplotvsel,all vsel,all

GEM – contact surfaces

We'll soon apply boundary conditions – to surface areas. Different materials meet in numerous places.  To ensure that the same boundary conditions apply on both sides of such interfaces, we “glue” all volumes:

This changes the volume numbers:

Exercise: work out which volume is which.

GEM – material attributes

Commands:

Volumes:1 – polyimide4 – lower metal5 – gas6 – upper metal

Materials:1 – metal2 – gas3 – polyimide

GEM – boundary conditions

Boundary conditions on the “gas”:

On the GEM metal layers: Volumes:1 – polyimide4 – lower metal5 – gas6 – upper metal

GEM – boundary conditions

Request E­field ∥ surface on gas and polyimide:

Note: This seems to have no effect.

Volumes:1 – polyimide4 – lower metal5 – gas6 – upper metal

GEM – meshing

Commands:

More efficient:

All volumes and areas are to be part of the model.

Fine meshingAll volumes are meshed

Fine meshingOnly gas and polyimide are meshed

GEM – solving and displaying

Commands to solve:

Display the potential:

Enter solution processorSolveLeave solution processor

Enter post­processorShow the solution

GEM – writing field maps

Commands:

Warning

“The Finite Element Method is a very useful tool which can make a good engineer better, but it can make a bad engineer dangerous.”

      [Robert D. Cook, Professor of Mechanical Engineering University of Wisconsin, Madison]

top related