|
Model applicability test
When you perform a simulation, you can get information
on the model's applicability for the results. The graphical representation
of valid results are depicted by filled symbols. It can be done using two
methods described below.
REMARK:
This tutorial is the follow up of the How
to add user model to Multi_R_Designer Section.
If you do not want to read this tutorial, you can download the solution and extract the files to TrickleBed/user/models. |
Setting inputs/outputs applicability ranges in the model information dialog window
1. Edit model information (Applicability page)
Add the physical property Liquid superficial velocity in the Range panel and set the range from 1.4E-4 to 8.3E-4 m/s. When all required fields are defined, press OK.
The next time you start Multi_R_Designer, your model will
be automaticaly updated.
Setting the model applicability specifications inside the code
In some models, applicability variables are used even
if they are not part of the model inputs. In this case, you should use
the following method to set the applicability range. The function void
setValid(boolean bvalid) defined in the
abstract class MRDModel is used to modify the internal applicability variable.
Use the function void setValid(boolean bvalid) only in the function public Number [] compute(Number inputs[]) throws Exception to set the applicability for each simulation. |
import multirdesigner.model.*;
// This is not a true model public class ValidSampleModel
extends
MRDModel
public
Number [] compute(Number inputs[]) throws
Exception
// Reynolds number
setValid(ReL < 10); // Valid for Reynolds less than 10.
// Outputs
return
new Double[] { new
Double(z) };
|
1. Java is a trademark of Sun Microsystems, Inc.