transiflow.interface.create
- create(parameters, nx, ny, nz=1, dim=None, dof=None, boundary_conditions=None, backend='SciPy')
Helper function to create an interface with a certain backend. This functions is aliased as
Interface. It can be called asfrom transiflow import Interface interface = Interface(parameters, nx, ny)
- Parameters:
- parametersdict
Key-value pairs describing parameters of the model, for instance the Renolds number and the problem type. Possible values can be found in Problem definitions.
- nxint
Grid size in the x direction.
- nyint
Grid size in the y direction.
- nzint, optional
Grid size in the z direction. 1 for 2-dimensional problems. This is the default.
- dimint, optional
Physical dimension of the problem. In case this is set to 2, w is not referenced in the state vector. The default is based on the value of nz.
- dofint, optional
Degrees of freedom for this problem. This should be set to dim plus 1 for each of pressure, temperature and salinity, if they are required for your problem. For example a 3D differentially heated cavity has dof = 3 + 1 + 1 = 5.
- boundary_conditionsfunction, optional
User-supplied function that implements the boundary conditions. It is called as
boundary_conditions(bc, atom)wherebcis an instance of theBoundaryConditionsclass.- backendstr, optional
The backend to use. Can be
Epetra,HYMLS,PETSc,SciPy.
- Returns:
- interfaceInterface
An interface instance.