Create an Model for Codes

The following step will show you how to create an model by using equations:

  1. Click model_set.jpg (858 bytes) in the optimization toolbar
    or click the "Models" in the system window and right click the mouse and select "Create a model".
  2. The following dialog will be displayed for selecting a proper method to create the model

  3. create_model_2.jpg (9101 bytes)

  4. Select the "Codes (C++)" and then click the "OK" button,
  5. A new view is opened to write C++ codes

A example of a truss structcture is shown as follow

double f(CVector &x){
          double t=0;
         set("fea\\Elements\\Property",x);
        call("Model,FEA_1");
        t=get("fea_1\\Weight,1");
        return t;
}

Related topics: