[Archive] Java interface

Message by Mike:

Hi,
just another question:
I found an example file using the spis libraries to make up a hall effect thruster model. How can I plug this together with a model or use such a java program under spis?
any ideas/suggestions welcome!
regards
Mike

Message by Roussel:

Hi,
The capabality to include an artificial source is not readily available yet.
It will be available in the next few months and has been discussed in SPINE meeting last week in Toulouse.
You’ll already find some information about that in SPIS/NUM documentation of the new Spis3.00.0rc release (distributed on the CD last week and on the web very soon):
Doc/DocSpisNum/HowTo/‘Controlling NUM from UI.html’
It is also of course possible to integrate an artificial source model by yourself, but you’ll need to dig a bit more into the code
Regards
Jean-Francois

Message by Mike:

Hi,
thanks for the answer, I’ll wait for the new release to download. I might then have another set of questions.
regards
mike

Message by Mike:

so, I have studied the Spis3.00 release, and also the thruster model in the spisnum package (HallThrusterExample), I got it running, but I have a few questions:

  1. I do not understand, how the plume is “plugged” onto the spacecraft (I see the Xenon density plots, but the profile is not really connected to the spacecraft, since I dont know how to do that)
  2. How does the interaction with SpisUI look like if I am using this model? (I know that part of the cariables is not transfered, that much I can see from the constructors)
  3. I have seen all the place-holders for source-temp., source-density and so on. How do those global flags affect the simulation that I try to set up with HallThrusterModel, if at all?

Thanks for answering!
regards
mike

Message by Roussel:

Dear Mike,
You certainly got the 3.00.0rc1 version on the CD that was distribution at SPINE meeting, 2 weeks ago, and is not yet published on the web.
It did not yet support the definition of artificial sources from the GUI.
The next version (3.00.0rc2 TBC) that will be on the web tomorrow (or Friday at the latest) will (partially) support that.
I’m working on the final tests of artificial sources.
What you saw, the HallThrusterExample, was just a test and you have to dig seriously into the source code to use it, it is not at all modified by UI-defined parameters (the Simulation class in use when defining parameters from the UI is SimultionFromUIParams).
Regards
JF

Message by Mike:

Hi,
thats very good to hear. I am aware of the changes in the constructors and that the parameters are not passed by the old HET example.
I am already reading deeply into the code, since I will have to make my own engine models sooner or later, thats why I am asking for more details.
I still dont understand from the source code, how the distribution (LocalMaxwellSurfDistrib) is attached to the SC-surface, or to be more precise, I cannot see to which part of the surface.
A few additional comments giving me a bit more detailed info would be very much appreciated (I know that the activities for this just started and that it is very early for such details…)
Thank you,
best regards
Mike

Message by julien:

Hi,
More generally, the interaction between SPIS-UI and a Java based program is very simple and straight forward.

  1. check that your java class is in the CLASSPATH of the JVM used to launch SPIS.
  2. check that your java class is in the PYTHONPATH of jython like that in spis_tasks_gui.sh:
jyhton -Dpython.path=$THEPATHTOTHEOTHER:$MYPATH/myClass:. ${SPIS\_HOME}/SpisUI/Bin/Tasks/SpisTasksGraph.py
  1. After to have launched SPIS, in the spis console:
import java
import myClass
mC = myClass()
mC.init()
mc.run()

Whatever your class do…

Message by Mike:

Hi,
Thanks for the answer, I’ll try soon!
regards
Mike

Message by Mike:

Hi all,
I have a tricky question. I have tried now to access the SPIS/NUM libraries from “outside”, from a small java program just loading the saved data from the GUI (including meshes and all parameters) and instantiating a simulation class (my own , i did some modifications, but it works fine from the GUI). The strange thing is: I got an error message “inconsistent meshes and boundary conditions” from the constructor of the poisson solver. The same settings (i.e. the data) work fine from within the GUI, but they give this error if I try it from outside. My guess is, that I miss something to load (I have now: local & global parameters, the boundary mesh, the S/C mesh, and the volume mesh), but I have no clue, what that could be.
Any hints would be great!
Thanks in advance
Mike
PS: I know, my question start to become very specialised…

Message by Mike:

Hi all,
I found a solution for the last question I posed: Instead of loading/saving the S/C and boundary meshes, one should derive them from the volume mesh. done, and it works.
cheers
Mike