Visualisation of Walls and TriMeshes

Asked by Thomas Wagner

How can I get a list of walls or faces so that I can refer to them in a runnable function? I looking for somthing like a LsmMpi.getWallList() function. I want to extend POVsnap.py to visualise walls and meshes.

Question information

Language:
English Edit question
Status:
Answered
For:
ESyS-Particle Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Dion Weatherley (d-weatherley) said :
#1

Hi Thomas,

This is a difficult question and I'll be honest that I don't know the answer so I'll try to offer a couple suggestions instead.

1) If the walls are stationary then write your own method to pass the required information to the Runnable
         a) for simple walls, you need to only pass the origin and normal of the wall
         b) for mesh walls, I suggest you create the wall using the method described in
             https://answers.launchpad.net/esys-particle/+question/53146 and pass the nodeSequence and faceSequence
             lists to the Runnable

2) If the walls are non-stationary, it is much more difficult because currently the code does not have subroutines for obtaining the position of walls from within python. There are FieldSavers for storing this information to file but not python subroutines. This is mostly because finding out this information requires communication between the master process and the worker processes. If this is done regularly, you will notice a huge performance hit. All I can really suggest here is to keep track of the motion of the walls yourself e.g. by updating the origin parameter for simple walls or updating the positions in the nodeSequence for mesh walls.

3) Output wall data to file then postprocess the output files to visualise the walls. To output wall data to file, there is a FieldSaver (http://iservo.edu.au/esys/esys_particle_python_doc/esys_particle-1.x.x/pythonapi/html/public/esys.lsm.LsmPy.WallVectorFieldSaverPrms-class.html) and the CheckPointer (http://iservo.edu.au/esys/esys_particle_python_doc/esys_particle-1.x.x/pythonapi/html/public/esys.lsm.LsmPy.CheckPointPrms-class.html). You need to use the LsmMpi.createFieldSaver() and LsmMpi.createCheckPointer() subroutines to initialise these two output methods. The CheckPointer should contain all the information needed to visualise both particles and walls. If you use the CheckPointer, leave visualisation until after the simulation is completed i.e. post-process the output files.

Sorry for the less than ideal response. The issue with having no getWallPosition() subroutine (or similar) has caused me some problems also. Usually there are ways to get around it with a little thought.

Hope these suggestions are helpful. Let me know how you go with this.

Cheers,

Dion.

Revision history for this message
SteffenAbe (s-abe) said :
#2

To 2): I've just implemented a getWallPosition() call in the development branch. Seems to work. (Dion: seen commit 1075 - if its needed quickly it should be easy to apply a diff to the trunk)

Steffen

Revision history for this message
Dion Weatherley (d-weatherley) said :
#3

Update on links to documentation:

Since first answering this question, some links to Python API documentation have changed. Here are the new links:

To output wall data to file, there is a wall field saver:
http://esys.esscc.uq.edu.au/esys-particle_python_doc/current/pythonapi/html/esys.lsm.LsmPy.WallVectorFieldSaverPrms-class.html

The Checkpointer is also useful for storing mesh wall information:
http://esys.esscc.uq.edu.au/esys-particle_python_doc/current/pythonapi/html/esys.lsm.LsmPy.CheckPointPrms-class.html

Cheers,

Dion.

Can you help with this problem?

Provide an answer of your own, or ask Thomas Wagner for more information if necessary.

To post a message you must log in.