[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: adding material using lua scripting



--- In femm@xxxxxxxxxxxxxxx, Tsarafidy RAMINOSOA <tsarafidy@xxxx> wrote:
> 
> Hi everybody,
> 
> I'd just have three questions :
> 
> - Is there a way , using lua scripting, to add a material that is
already in the materials library without specifying all its properties
as with the command "addmaterial"

There currently isn't a way to directly add materials from the
materials library from within lua. As an alternative, you can create
a .fem file that has just the desired properties from the materials
library. (i.e. just add these materials to the current model and save
the file). You can then load this file at the beginning of your lua
script using:
openfemmfile("filename.fem")

If you are running the development version 3.3, the materials library
data is stored in the same file format as the materials in a .fem
file. This means that you can do:
openfemmfile("c:\\progra~1\\femm33\\bin\\matlib.dat")
to load the entire materials library into the workspace.

> - Is the lua command "addbhpoint" only usable for materials that are
prealably specified as non linear or does it implicitly specify the
material as a non linear one
> 

If any BH points are defined, the material is assumed to be nonlinear.

> - When using this command "addbhpoint("blockname",b,h)" are b and h
vectors or should I write this command for each point I want to enter.

You have to write this command for each point you want to enter

Dave.
--
http://femm.berlios.de/dmeeker