Bases: esys.escriptcore.modelframe.ParameterSet
Sets a gravity force of given direction in given domain:
Variables: |
|
---|
Returns a set of tuples (“<self>(<name>)”, <target model>) if the parameter <name> is linked to model <target model> but <target model> is not in the list of models. If a parameter is linked to another parameter set which is not in the hash list the parameter set is checked for its models. hash gives the call history.
Declares one or more new parameters and their initial value.
Declares a set of parameters. parameters can be a list, a dictionary or a ParameterSet.
Returns the object stored for attribute name.
return the gravity force as density * gravity * direction
Returns True if self has attribute name.
Removes parameter name from the parameters.
Returns a description of the parameters.
toDom method of Model class.
If debugging is on, prints the message, otherwise does nothing.
Writes the object as an XML object into an output stream.
Bases: esys.escriptcore.modelframe.ParameterSet
A simple matrial table which allows setting physical ivar of a model
Variables: |
|
---|
Returns a set of tuples (“<self>(<name>)”, <target model>) if the parameter <name> is linked to model <target model> but <target model> is not in the list of models. If a parameter is linked to another parameter set which is not in the hash list the parameter set is checked for its models. hash gives the call history.
Declares one or more new parameters and their initial value.
Declares a set of parameters. parameters can be a list, a dictionary or a ParameterSet.
Returns the object stored for attribute name.
Returns True if self has attribute name.
Removes parameter name from the parameters.
Returns a description of the parameters.
toDom method of Model class.
If debugging is on, prints the message, otherwise does nothing.
Writes the object as an XML object into an output stream.
Bases: esys.escriptcore.modelframe.ParameterSet
A Model object represents a process marching over time until a finalizing condition is fulfilled. At each time step an iterative process can be performed and the time step size can be controlled. A Model has the following work flow:
doInitialization()
while not terminateInitialIteration(): doInitialStep()
doInitialPostprocessing()
while not finalize():
dt=getSafeTimeStepSize(dt)
doStepPreprocessing(dt)
while not terminateIteration(): doStep(dt)
doStepPostprocessing(dt)
doFinalization()
where doInitialization, finalize, getSafeTimeStepSize, doStepPreprocessing, terminateIteration, doStepPostprocessing, doFinalization are methods of the particular instance of a Model. The default implementations of these methods have to be overwritten by the subclass implementing a Model.
Returns a set of tuples (“<self>(<name>)”, <target model>) if the parameter <name> is linked to model <target model> but <target model> is not in the list of models. If a parameter is linked to another parameter set which is not in the hash list the parameter set is checked for its models. hash gives the call history.
Declares one or more new parameters and their initial value.
Declares a set of parameters. parameters can be a list, a dictionary or a ParameterSet.
Finalizes the time stepping.
This function may be overwritten.
Finalises the initialization iteration process. This method is not called in case of a restart.
This function may be overwritten.
Performs an iteration step in the initialization phase. This method is not called in case of a restart.
This function may be overwritten.
Initializes the time stepping scheme. This method is not called in case of a restart.
This function may be overwritten.
Executes an iteration step at a time step.
dt is the currently used time step size.
This function may be overwritten.
Finalises the time step.
dt is the currently used time step size.
This function may be overwritten.
Sets up a time step of step size dt.
This function may be overwritten.
Returns False if the time stepping is finalized.
This function may be overwritten.
Returns the object stored for attribute name.
Returns a time step size which can be safely used.
dt gives the previously used step size.
This function may be overwritten.
Returns True if self has attribute name.
Removes parameter name from the parameters.
Sets up the model.
This function may be overwritten.
Returns a description of the parameters.
Returns True if iteration at the inital phase is terminated.
Returns True if iteration on a time step is terminated.
toDom method of Model class.
If debugging is on, prints the message, otherwise does nothing.
Writes the object as an XML object into an output stream.
Bases: esys.escriptcore.modelframe.LinkableObject
A class which allows to emphasize attributes to be written and read to XML.
Leaves of an ESySParameters object can be:
- a real number
- an integer number
- a string
- a boolean value
- a ParameterSet object
- a Simulation object
- a Model object
- a numpy object
- a list of booleans
- any other object (not considered by writeESySXML and writeXML)
Example for how to create an ESySParameters object:
p11=ParameterSet(gamma1=1.,gamma2=2.,gamma3=3.)
p1=ParameterSet(dim=2,tol_v=0.001,output_file="/tmp/u.%3.3d.dx",runFlag=True,parm11=p11)
parm=ParameterSet(parm1=p1,parm2=ParameterSet(alpha=Link(p11,"gamma1")))
This can be accessed as:
parm.parm1.gamma=0.
parm.parm1.dim=2
parm.parm1.tol_v=0.001
parm.parm1.output_file="/tmp/u.%3.3d.dx"
parm.parm1.runFlag=True
parm.parm1.parm11.gamma1=1.
parm.parm1.parm11.gamma2=2.
parm.parm1.parm11.gamma3=3.
parm.parm2.alpha=1. (value of parm.parm1.parm11.gamma1)
Returns a set of tuples (“<self>(<name>)”, <target model>) if the parameter <name> is linked to model <target model> but <target model> is not in the list of models. If a parameter is linked to another parameter set which is not in the hash list the parameter set is checked for its models. hash gives the call history.
Declares one or more new parameters and their initial value.
Declares a set of parameters. parameters can be a list, a dictionary or a ParameterSet.
Returns the object stored for attribute name.
Returns True if self has attribute name.
Removes parameter name from the parameters.
Returns a description of the parameters.
toDom method of Model class.
If debugging is on, prints the message, otherwise does nothing.
Writes the object as an XML object into an output stream.
Bases: esys.escriptcore.modelframe.ParameterSet
A simple matrial table run convection models:
density=density0*(1-expansion_coefficient*(temperature-reference_temperature))
viscocity=viscocity0*(exp(alpha*(1/reference_temperature - 1/temperature))
Variables: |
|
---|
Returns a set of tuples (“<self>(<name>)”, <target model>) if the parameter <name> is linked to model <target model> but <target model> is not in the list of models. If a parameter is linked to another parameter set which is not in the hash list the parameter set is checked for its models. hash gives the call history.
Declares one or more new parameters and their initial value.
Declares a set of parameters. parameters can be a list, a dictionary or a ParameterSet.
Returns the object stored for attribute name.
Returns True if self has attribute name.
Removes parameter name from the parameters.
Returns a description of the parameters.
toDom method of Model class.
If debugging is on, prints the message, otherwise does nothing.
Writes the object as an XML object into an output stream.
Bases: esys.modellib.materials.MaterialTable
A simple matrial table which allows setting physical ivar of a model.
Returns a set of tuples (“<self>(<name>)”, <target model>) if the parameter <name> is linked to model <target model> but <target model> is not in the list of models. If a parameter is linked to another parameter set which is not in the hash list the parameter set is checked for its models. hash gives the call history.
Declares one or more new parameters and their initial value.
Declares a set of parameters. parameters can be a list, a dictionary or a ParameterSet.
Returns the object stored for attribute name.
Returns True if self has attribute name.
Removes parameter name from the parameters.
Returns a description of the parameters.
toDom method of Model class.
If debugging is on, prints the message, otherwise does nothing.
Writes the object as an XML object into an output stream.
Bases: esys.modellib.materials.MaterialTable
A simple matrial table which allows setting physical parameters of a model.
Returns a set of tuples (“<self>(<name>)”, <target model>) if the parameter <name> is linked to model <target model> but <target model> is not in the list of models. If a parameter is linked to another parameter set which is not in the hash list the parameter set is checked for its models. hash gives the call history.
Declares one or more new parameters and their initial value.
Declares a set of parameters. parameters can be a list, a dictionary or a ParameterSet.
Returns the object stored for attribute name.
Returns True if self has attribute name.
Removes parameter name from the parameters.
Returns a description of the parameters.
toDom method of Model class.
If debugging is on, prints the message, otherwise does nothing.
Writes the object as an XML object into an output stream.
Returns e to the power of argument arg.
Parameters: | arg (float, escript.Data, Symbol, numpy.ndarray.) – argument |
---|---|
Return type: | float, escript.Data, Symbol, numpy.ndarray depending on the type of arg |
Raises TypeError: | |
if the type of the argument is not expected |