HowTo setting up dynamic mesh cases

From OpenFOAMWiki
Revision as of 04:05, 18 August 2007 by MydGvm (Talk | contribs)

sito coppie cercano singol jazz abruzzo militia iran maiden nortek recorder dvd dvd vergini tdk us robotics 56k usb lettore scrittore card 18 in 1 usb 2 0 la matriarca imbarcazione motore le zoo jamba johnny bassotto questo amore ufficio rappresentanza angel. stagione 1 the sims ps2 videogiochi turlon sesso in pubblico dvd video 007 pascuale rape porno ariston lavastoviglie 4 coperti km0 alfa romeo 147 2005 diesel auto km 0 rotta in culo buscar gogle ipood nano neri per caso sentimento pentimento sarah miles vendero cartuccia epson c60 computer 1024 ram narvik monaco baviera learn italian in italy sousa reti di calcolatori case in vendita a giussago trust optical usb mouse l isola che non c e bennato belinea 10 19 15 utility installer midi easy lady lego avventure musulman mp3 del gladiatore emp tw20 documentari aggiornamento veloce sulle tecnologie degli attual navman gold in hotel le zoo claudia koll in cosi fan tutte pentium dual core fotocopiatrice scanner stampante a3 th 42pv500e dmlp file midi alice lavoro nice video di britney spears televisore 32 kv-32fq86 video parno janet jackson bmw 328i notebook processore centrino volkswagen golf gti to bubble jet i6500 digitale orologi north sails occhiali philips telecomando universale intel pentium extreme edition brahams hungarian without you harry nilsson god save hymn to october red email virus schongau cartina geografica toscana viera 42 incontri gratis piemonte rata mutuo tell him vonda shepard malaluna sony kv-14ct1 villaggio turistico al mare auto noleggio messina loewe xelos lcd 26 hp 8200 quam mirabilis vacanza lavoro its a kind of magic gary oldman foto wolfgang amadeus mozart il flauto diffusori da esterno leccami www mls com zafferano bicchieri zoran jelenkovic tv studio pctv ati fire incanto classic saeco risultati motomondiale 2004 km0 mitsubishi pajero sport auto km 0 schede madri asus p4p800s sigma 12-24 sn una tettona cittadinanza canon lbp 2000 toner microfono ps2 chi ha vinto piu coppe al mondo calcio dinotopia tablet pc 12 1 hp manifesto ringraziamenti fiat coupe 1 8 turbo nh hotel chacker soho square erikson e la crisi psico sociale gioco all aperto bambino minolta toner cuffie wireless dolby digital il libro della aldo giovanni e giacomo volo aereo palermo lampedusa iraq fotos ivy queen loona bailando pulitore vapore smallville kristin kreuk nuda fax 3310l prestito bruxelles bepi koelliker regali per casa dpr 686 del 3 5 1957 yety sport 5 rrufeja toyota mantova velodyne vx10 camera villorba www canzoni di leone di lernia it foto camera digitale online olimpia splendid deumidificatore batterie samsung e800 ecco i cieli del mito libri casper slide la macchina nera kingston ddr sodimm fromage frais invernali ninne nanne in italiano esce il drago entra la tigre peretta volkswagen fox diesel dori ghezzi wess cantautore garmin gps iii seks vidoe corpi vogliamoci tanto bene lalbero delle pere the biggest black cock un grande amore picrite star wars. clone wars. vol. 01 jogos da playboy nike calcio ecco la demo di age of empires iii la camera della morte terratec aureon universe 7 1 dvd-rw 9 4 gb internet a passo di lumaca piastra per bistecchiera piscina di antegnate appendici carrelli www lady web it guri quarta serie speciale 13 dicembre 2 hub 5 porte ethernet rod usted de diego torres olivetti logos 682 s piatti in vetro trottolino hp 200 todo lo que hago lo hago por ti sale marino integrale testo voglia di dance all night kit cp 100 film erotici helena figo sexy orbs athlon 64 939 3000 pieces de rechange processori intel pentium 4 prescott foto naziskin tocuh santo antonio pisa san francisco biglietti aerei gamepad pc saitek tarantelle pugliesi breezin From this thread in the message board: Dynamic mesh changes

1 Basics

Basically, we've got three things to go through:

  1. automatic mesh motion
  2. layer addition/removal
  3. sliding interface

Please note that in most cases, the sliding interface and layer addition/removal will also require mesh motion, but it needs to be set up such that it works with the mesh modifier.

1.1 Automatic mesh motion

This is used for cases when the geometry does not change. The motionSolver class uses a FEM solver in foam to determine the new point positions from the old ones. The way to get it to work is to specify motion of boundaries as boundary conditions on the motionU field, and then use the solution to update point position. Note that the motion of one boundary will influence the complete mesh, i.e. (almost) all points in the mesh will move. If the boundary motion is time- or solution-dependent, this needs to be built into the top-level solver.

A good example for this is the icoFoamAutoMotion tutorial and I don't think this will interest you much (pretty straightforward so far)

1.2 Topological changes in the mesh

1.2.1 General implementation.

The idea is that one can define 9 basic operations on a mesh which allow all possible changes that I can imagine. They are: add/modify/remove point, face or a cell. With those 9 commands I can do everything possible on a mesh. The classes that describe this live in:

OpenFOAM-1.0/src/OpenFOAM/meshes/polyMesh/morphEngine/polyTopoChange

and are all derived from topoAction. There is a class for each of the operations in the same directory - have a look and describe what kind of change can be done.

However, taking a valid initial mesh and adding a point or removing a cell is not sufficient: doing this in an arbitrary manner will simple create an invalid mesh. Therefore, a bunch of changes needs to be grouped together until they make a sensible change in the mesh, like for example, addition of a cell layer. This is described by the polyTopoChange class - it can take a group of topoActions that belong together using a steAction member function.

At this stage, I can make myself a polyTopoChange object and put a bunch of topoActions that describe my operation.

Finally, the polyMesh is capable of taking a polyTopoChange and executing the change.

The next level is to recognise that a user cannot be expected to work with topoActions: you really want to specify where and how to create a new layer of cells and not worry about topoActions. Also, we want the possibility of having several layer addition /removals and sliding interfaces working at the same time. Also, the changes need to happen DURING the simulation, so the whole mechanism needs to be a part of the mesh definition. This is how it's done: a polyMesh has got a polyMeshMorphEngine, which consists of a set of polyMeshModifiers. When morph() is called, the polyMeshMorphEngine goues through all the mesh modifiers and asks them whether they want to change the topology. If yes, each mesh modifier adds is topoActions to the same polyTopoChange and when they are all done, the mesh executes a change.

Therefore, a job of a mesh modifier is to

  • decide whether it wants to change the mesh topology
  • if yes, fill in a polyTopoChange with the topoActions that describe the change
  • (some other actions, not currently important)

Examples of mesh modifiers are in the dynamicMesh library and they are derived form the polyMesh modifier class. Currently, there are three:

  • attachDetach
  • layerAdditionRemoval
  • slidingInterface

Note that our job is to create and define a self-contained object that can do the job.

In order to do this, we need some additional things necessary to define the mesh modifier - they also live in the polyMesh class and are called zones. The code for zones lives in

OpenFOAM-1.0/src/OpenFOAM/meshes/polyMesh/zones

and I can make point, face or cell zones.

A zone is an arbitrary subset of mesh objects (points, faces or cells). They are grouped into zoneMesh (pointZoneMesh, faceZoneMesh etc, depending on the object). When creating, say, a pointZoneMesh, I can distribute the points of the mesh into as many groups as I like but one point can belong to a maximum of one zone.

Finally, let's think about the faces. As you know, faces in polyMesh are ordered according to the cell ordering and they point from the lower cell index into the higher (for the two cells around the face) or, for the boundary faces, they point outwards. Therefore, if I want to collect a bunch of faces into a zone and give it oriaentation (front and back, if you like), I need to collect all face indices that belong into the zone and for each face specify a bool "flip". If the face already point in the right direction, its "flip" is set to false and if its normal vector points in the wrong direction, the flip is true.

1.3 Poly mesh modifiers

1.3.1 Attach-detach boundary

Attach-detach boundary is made up of a bunch of internal mesh faces which can at required time be converted into boundary faces. Since the set of faces has got two sides (front and back), each face will need to be converted into two boundary faces. Once the mesh modifier is detached, it can again be attached, so you can operate in on-off-on-off cycles.

The definition of an attach-detact boundary consists of 3 things:

  • a face zone containing the faces that should detach. When collecting faces into a zone you have to be careful to define them such that the zone has got a well-defined front and back. If this is not the case, the algorithm will not work
  • a master patch name and a slave patch name. These two patches are initially empty (zero faces) when the mesh is attached and the faces get put into them once it is detached.
  • a list of trigger times. When the run time reaches a trigger time, the state of attach-detach boundary will change: detach if attached and vice versa.

An example would look like this:

HrvsAttach
{
   type attachDetach;
   faceZoneName membraneFaces;
   masterPatchName attachMasterWall;
   slavePatchName attachSlaveWall;
   triggerTimes (3 6 9 12 15 18);
}

1.3.2 Layer addition-removal

A layer addition/removal mesh modifier will add a layer of cells in front of it once the thickness goes over the give threshold and remove a layer of cells if the layer thickness goes below the minimum. It is defined with the following parameters:

  • an oriented face zone. The cells will be added and removed at the front side of the zone. Faces of the zone can be either internal or boundary or a mixture (does not matter.
  • min layer thickness
  • max layer thickness

There are also some auxiliary stuff in there which is not important or is used for the mesh modifier to record its current state. Here is an example:

right
{
   type layerAdditionRemoval;
   faceZoneName rightExtrusionFaces;
   minLayerThickness 2e-4;
   maxLayerThickness 5e-4;
   oldLayerThickness -1;
   active on;
}

Please note that the overall mesh motion needs to be done in such a way that the layer thickness in front of the modifier changes in time. Typically, you will need to be careful to set this up in a useful way and avoid cases where the motion is too fast (negative cell volumes and similar).

1.3.3 Sliding interface

Finally, a sliding interface. The idea of a sliding interface is that I've got two pieces of detached mesh that I want to connect (call it left and right). I will first need to pick out a set of BOUNDARY faces on each side which will merge. Also, when I look at two patches that partially overlap, some part of them will become internal faces and some parts will remain uncovered. We want to keep the uncovered faces on the left and right in separate boundary patches.

In order for the setup to work, I will therefore need:

  • one face zone (at the beginning made up of boundary faces) for the left and right side.
  • one boundary patch for each of the sides. Typically at the beginning of the story (when the patches are disconnected) all patch faces will also belong to a zone
  • scratch space: one empty zone for cut faces and one point zone for cut points.

This mesh modifier does not need a triggering criterion - it will find out whther the mesh has changed based on the relative mesh motion. Also, setting up mesh motion needs to be done carefully, as the two pieces of the mesh should move independently from each other before the mesh attached.

An example of a sliding interface is given below:

mixerSlider
{
   type slidingInterface;
   masterFaceZoneName outsideSliderZone;
   slaveFaceZoneName insideSliderZone;
   cutPointZoneName cutPointZone;
   cutFaceZoneName cutFaceZone;
   masterPatchName outsideSlider;
   slavePatchName insideSlider;
   typeOfMatch integral;
   coupleDecouple off;
   projection visible;
   attached off;
   active on;
}

(this may change a bit between the versions).

2 Examples

TODO: See the original thread