/*
 * layered_shell_structure_connection.java
 */

import com.comsol.model.*;
import com.comsol.model.util.*;

/** Model exported on May 14 2026, 08:03 by COMSOL 6.4.0.420. */
public class layered_shell_structure_connection {

  public static Model run() {
    Model model = ModelUtil.create("Model");

//    From the File menu, choose New.
//    In the New window, click Model Wizard.
//    In the Model Wizard window, click 3D.
//    In the Select Physics tree, select Structural Mechanics > Solid Mechanics (solid), Structural Mechanics > Shell (shell), Structural Mechanics > Layered Shell (lshell).
//    Right-click and choose Add Physics.
//    Click Study.
//    In the Select Study tree, select General Studies > Stationary.
//    Click Done.

    model.component().create("comp1", true);

    model.component("comp1").geom().create("geom1", 3);
    model.component("comp1").geom("geom1").geomRep("comsol");

    model.component("comp1").mesh().create("mesh1");
    model.component("comp1").mesh("mesh1").contribute("geom/detail", true);

    model.component("comp1").physics().create("solid", "SolidMechanics", "geom1");
    model.component("comp1").physics().create("shell", "Shell", "geom1");
    model.component("comp1").physics().create("lshell", "LayeredShell", "geom1");

    model.study().create("std1");
    model.study("std1").create("stat", "Stationary");

    model.component("comp1").geom("geom1").run();

//    In the Model Builder window, right-click Component 1 (comp1) > Layered Shell (lshell) and choose Move Up.

    model.component("comp1").physics().move("lshell", 1);

//    In the Model Builder window, under Global Definitions, click Parameters 1.
//    In the Settings window for Parameters, locate the Parameters section.
//    In the table, enter the following settings:

    model.param().set("F", "10[kN]");
    model.param().descr("F", "Total load");

//    In the Geometry toolbar, click Insert Sequence and choose Insert Sequence.

    model.component("comp1").geom("geom1")
         .insertFile("layered_shell_structure_connection_geom_sequence.mph", "geom1");

//    Browse to the model's Application Library folder and double-click the file layered_shell_structure_connection_geom_sequence.mph.
//    In the Geometry toolbar, click Build All.

    model.component("comp1").geom("geom1").run("fin");

//    Click the Show Grid button in the Graphics toolbar.

    model.component("comp1").view("view1").set("showgrid", false);

//    In the Model Builder window, right-click Component 1 (comp1) > Definitions and choose Variables.

    model.component("comp1").variable().create("var1");

//    In the Settings window for Variables, locate the Geometric Entity Selection section.
//    From the Geometric entity level list, select Domain.

    model.component("comp1").variable("var1").selection().geom("geom1", 3);

//    Click Paste Selection.
//    In the Paste Selection dialog, type 4,6 in the Selection text field.
//    Click OK.

    model.component("comp1").variable("var1").selection().set(4, 6);

//    In the Settings window for Variables, locate the Variables section.
//    In the table, enter the following settings:

    model.component("comp1").variable("var1").set("misesTop_solid", "solid.mises");
    model.component("comp1").variable("var1").descr("misesTop_solid", "von Mises stress");

//    In the Model Builder window, right-click Definitions and choose Variables.

    model.component("comp1").variable().create("var2");

//    In the Settings window for Variables, locate the Geometric Entity Selection section.
//    From the Geometric entity level list, select Domain.

    model.component("comp1").variable("var2").selection().geom("geom1", 3);

//    Click Paste Selection.
//    In the Paste Selection dialog, type 3,5 in the Selection text field.
//    Click OK.

    model.component("comp1").variable("var2").selection().set(3, 5);

//    In the Settings window for Variables, locate the Variables section.
//    In the table, enter the following settings:

    model.component("comp1").variable("var2").set("misesBot_solid", "solid.mises");
    model.component("comp1").variable("var2").descr("misesBot_solid", "von Mises stress");

//    Right-click Definitions and choose Variables.

    model.component("comp1").variable().create("var3");

//    In the Settings window for Variables, locate the Variables section.
//    In the table, enter the following settings:

    model.component("comp1").variable("var3").set("misesTop_lshell", "lshell.atxd1(lshell.d,mean(lshell.mises))");
    model.component("comp1").variable("var3").descr("misesTop_lshell", "von Mises stress");

//    Add required materials and layered material first.
//    In the Materials toolbar, click Add Material to open the Add Material window.
//    In the tree, select Built-in > Structural steel.
//    Right-click and choose Add to Global Materials.

    model.material().create("mat1", "Common", "");
    model.material("mat1").propertyGroup().create("Enu", "Enu", "Young's modulus and Poisson's ratio");
    model.material("mat1").propertyGroup("Enu").func().create("int1", "Interpolation");
    model.material("mat1").propertyGroup("Enu").func().create("int2", "Interpolation");
    model.material("mat1").propertyGroup().create("Murnaghan", "Murnaghan", "Murnaghan");
    model.material("mat1").propertyGroup()
         .create("ElastoplasticModel", "ElastoplasticModel", "Elastoplastic material model");
    model.material("mat1").propertyGroup("ElastoplasticModel").func().create("int1", "Interpolation");
    model.material("mat1").propertyGroup().create("Ludwik", "Ludwik", "Ludwik");
    model.material("mat1").propertyGroup("Ludwik").func().create("int1", "Interpolation");
    model.material("mat1").propertyGroup().create("JohnsonCook", "JohnsonCook", "Johnson-Cook");
    model.material("mat1").propertyGroup().create("Swift", "Swift", "Swift");
    model.material("mat1").propertyGroup().create("Voce", "Voce", "Voce");
    model.material("mat1").propertyGroup("Voce").func().create("int1", "Interpolation");
    model.material("mat1").propertyGroup().create("HockettSherby", "HockettSherby", "Hockett-Sherby");
    model.material("mat1").propertyGroup("HockettSherby").func().create("int1", "Interpolation");
    model.material("mat1").propertyGroup().create("ArmstrongFrederick", "ArmstrongFrederick", "Armstrong-Frederick");
    model.material("mat1").propertyGroup("ArmstrongFrederick").func().create("int1", "Interpolation");
    model.material("mat1").propertyGroup().create("Norton", "Norton", "Norton");
    model.material("mat1").propertyGroup().create("Garofalo", "Garofalo", "Garofalo (hyperbolic sine)");
    model.material("mat1").propertyGroup()
         .create("ChabocheViscoplasticity", "ChabocheViscoplasticity", "Chaboche viscoplasticity");
    model.material("mat1").label("Structural steel");
    model.material("mat1").set("family", "custom");
    model.material("mat1")
         .set("customspecular", new double[]{0.7843137254901961, 0.7843137254901961, 0.7843137254901961});
    model.material("mat1").set("diffuse", "custom");
    model.material("mat1")
         .set("customdiffuse", new double[]{0.6666666666666666, 0.6666666666666666, 0.6666666666666666});
    model.material("mat1").set("ambient", "custom");
    model.material("mat1")
         .set("customambient", new double[]{0.6666666666666666, 0.6666666666666666, 0.6666666666666666});
    model.material("mat1").set("noise", true);
    model.material("mat1").set("fresnel", 0.9);
    model.material("mat1").set("roughness", 0.3);
    model.material("mat1").set("diffusewrap", 0);
    model.material("mat1").set("reflectance", 0);
    model.material("mat1").propertyGroup("def").set("lossfactor", "0.02");
    model.material("mat1").propertyGroup("def")
         .set("relpermeability", new String[]{"1", "0", "0", "0", "1", "0", "0", "0", "1"});
    model.material("mat1").propertyGroup("def").set("heatcapacity", "475[J/(kg*K)]");
    model.material("mat1").propertyGroup("def")
         .set("thermalconductivity", new String[]{"44.5[W/(m*K)]", "0", "0", "0", "44.5[W/(m*K)]", "0", "0", "0", "44.5[W/(m*K)]"});
    model.material("mat1").propertyGroup("def")
         .set("electricconductivity", new String[]{"4.032e6[S/m]", "0", "0", "0", "4.032e6[S/m]", "0", "0", "0", "4.032e6[S/m]"});
    model.material("mat1").propertyGroup("def")
         .set("relpermittivity", new String[]{"1", "0", "0", "0", "1", "0", "0", "0", "1"});
    model.material("mat1").propertyGroup("def")
         .set("thermalexpansioncoefficient", new String[]{"12.3e-6[1/K]", "0", "0", "0", "12.3e-6[1/K]", "0", "0", "0", "12.3e-6[1/K]"});
    model.material("mat1").propertyGroup("def").set("density", "7850[kg/m^3]");
    model.material("mat1").propertyGroup("Enu").func("int1").set("funcname", "E");
    model.material("mat1").propertyGroup("Enu").func("int1")
         .set("table", new String[][]{{"293.15", "200e9"}, {"793.15", "166.6e9"}});
    model.material("mat1").propertyGroup("Enu").func("int1").set("extrap", "linear");
    model.material("mat1").propertyGroup("Enu").func("int1").set("fununit", new String[]{"Pa"});
    model.material("mat1").propertyGroup("Enu").func("int1").set("argunit", new String[]{"K"});
    model.material("mat1").propertyGroup("Enu").func("int2").set("funcname", "nu");
    model.material("mat1").propertyGroup("Enu").func("int2")
         .set("table", new String[][]{{"293.15", "0.30"}, {"793.15", "0.315"}});
    model.material("mat1").propertyGroup("Enu").func("int2").set("extrap", "linear");
    model.material("mat1").propertyGroup("Enu").func("int2").set("fununit", new String[]{"1"});
    model.material("mat1").propertyGroup("Enu").func("int2").set("argunit", new String[]{"K"});
    model.material("mat1").propertyGroup("Enu").set("E", "E(T)");
    model.material("mat1").propertyGroup("Enu").set("nu", "nu(T)");
    model.material("mat1").propertyGroup("Enu").addInput("temperature");
    model.material("mat1").propertyGroup("Murnaghan").set("l", "-3.0e11[Pa]");
    model.material("mat1").propertyGroup("Murnaghan").set("m", "-6.2e11[Pa]");
    model.material("mat1").propertyGroup("Murnaghan").set("n", "-7.2e11[Pa]");
    model.material("mat1").propertyGroup("ElastoplasticModel").func("int1").set("funcname", "a");
    model.material("mat1").propertyGroup("ElastoplasticModel").func("int1")
         .set("table", new String[][]{{"600", "1"}, {"1100", "0.1"}, {"1643", "0"}});
    model.material("mat1").propertyGroup("ElastoplasticModel").func("int1").set("fununit", new String[]{"1"});
    model.material("mat1").propertyGroup("ElastoplasticModel").func("int1").set("argunit", new String[]{"K"});
    model.material("mat1").propertyGroup("ElastoplasticModel").set("sigmags", "350[MPa]*a(T)");
    model.material("mat1").propertyGroup("ElastoplasticModel").set("Et", "1.045[GPa]*a(T)");
    model.material("mat1").propertyGroup("ElastoplasticModel").set("Ek", "1.045[GPa]*a(T)");
    model.material("mat1").propertyGroup("ElastoplasticModel").set("sigmagh", "1.050[GPa]*epe*a(T)");
    model.material("mat1").propertyGroup("ElastoplasticModel")
         .set("Hillcoefficients", new String[]{"0[m^2*s^4/kg^2]", "0[m^2*s^4/kg^2]", "0[m^2*s^4/kg^2]", "0[m^2*s^4/kg^2]", "0[m^2*s^4/kg^2]", "0[m^2*s^4/kg^2]"});
    model.material("mat1").propertyGroup("ElastoplasticModel")
         .set("ys", new String[]{"0[N/m^2]", "0[N/m^2]", "0[N/m^2]", "0[N/m^2]", "0[N/m^2]", "0[N/m^2]"});
    model.material("mat1").propertyGroup("ElastoplasticModel").addInput("temperature");
    model.material("mat1").propertyGroup("ElastoplasticModel").addInput("effectiveplasticstrain");
    model.material("mat1").propertyGroup("Ludwik").func("int1").set("funcname", "a");
    model.material("mat1").propertyGroup("Ludwik").func("int1")
         .set("table", new String[][]{{"600", "1"}, {"1100", "0.1"}, {"1643", "0"}});
    model.material("mat1").propertyGroup("Ludwik").func("int1").set("fununit", new String[]{"1"});
    model.material("mat1").propertyGroup("Ludwik").func("int1").set("argunit", new String[]{"K"});
    model.material("mat1").propertyGroup("Ludwik").set("k_lud", "560[MPa]*a(T)");
    model.material("mat1").propertyGroup("Ludwik").set("n_lud", "0.61");
    model.material("mat1").propertyGroup("Ludwik").addInput("temperature");
    model.material("mat1").propertyGroup("JohnsonCook").label("Johnson-Cook");
    model.material("mat1").propertyGroup("JohnsonCook").set("k_jcook", "560[MPa]");
    model.material("mat1").propertyGroup("JohnsonCook").set("n_jcook", "0.61");
    model.material("mat1").propertyGroup("JohnsonCook").set("C_jcook", "0.12");
    model.material("mat1").propertyGroup("JohnsonCook").set("epet0_jcook", "1[1/s]");
    model.material("mat1").propertyGroup("JohnsonCook").set("m_jcook", "0.6");
    model.material("mat1").propertyGroup("Swift").set("e0_swi", "0.021");
    model.material("mat1").propertyGroup("Swift").set("n_swi", "0.2");
    model.material("mat1").propertyGroup("Voce").func("int1").set("funcname", "a");
    model.material("mat1").propertyGroup("Voce").func("int1")
         .set("table", new String[][]{{"600", "1"}, {"1100", "0.1"}, {"1643", "0"}});
    model.material("mat1").propertyGroup("Voce").func("int1").set("fununit", new String[]{"1"});
    model.material("mat1").propertyGroup("Voce").func("int1").set("argunit", new String[]{"K"});
    model.material("mat1").propertyGroup("Voce").set("sigma_voc", "249[MPa]*a(T)");
    model.material("mat1").propertyGroup("Voce").set("beta_voc", "9.3");
    model.material("mat1").propertyGroup("Voce").addInput("temperature");
    model.material("mat1").propertyGroup("HockettSherby").label("Hockett-Sherby");
    model.material("mat1").propertyGroup("HockettSherby").func("int1").set("funcname", "a");
    model.material("mat1").propertyGroup("HockettSherby").func("int1")
         .set("table", new String[][]{{"600", "1"}, {"1100", "0.1"}, {"1643", "0"}});
    model.material("mat1").propertyGroup("HockettSherby").func("int1").set("fununit", new String[]{"1"});
    model.material("mat1").propertyGroup("HockettSherby").func("int1").set("argunit", new String[]{"K"});
    model.material("mat1").propertyGroup("HockettSherby").set("sigma_hoc", "684[MPa]*a(T)");
    model.material("mat1").propertyGroup("HockettSherby").set("m_hoc", "3.9");
    model.material("mat1").propertyGroup("HockettSherby").set("n_hoc", "0.85");
    model.material("mat1").propertyGroup("HockettSherby").addInput("temperature");
    model.material("mat1").propertyGroup("ArmstrongFrederick").label("Armstrong-Frederick");
    model.material("mat1").propertyGroup("ArmstrongFrederick").func("int1").set("funcname", "a");
    model.material("mat1").propertyGroup("ArmstrongFrederick").func("int1")
         .set("table", new String[][]{{"600", "1"}, {"1100", "0.1"}, {"1643", "0"}});
    model.material("mat1").propertyGroup("ArmstrongFrederick").func("int1").set("fununit", new String[]{"1"});
    model.material("mat1").propertyGroup("ArmstrongFrederick").func("int1").set("argunit", new String[]{"K"});
    model.material("mat1").propertyGroup("ArmstrongFrederick").set("Ck", "2.070[GPa]*a(T)");
    model.material("mat1").propertyGroup("ArmstrongFrederick").set("gammak", "8.0");
    model.material("mat1").propertyGroup("ArmstrongFrederick").addInput("temperature");
    model.material("mat1").propertyGroup("Norton").set("A_nor", "1.2e-15[1/s]");
    model.material("mat1").propertyGroup("Norton").set("sigRef_nor", "1[MPa]");
    model.material("mat1").propertyGroup("Norton").set("n_nor", "4.5");
    model.material("mat1").propertyGroup("Garofalo").set("A_gar", "1e-6[1/s]");
    model.material("mat1").propertyGroup("Garofalo").set("sigRef_gar", "100[MPa]");
    model.material("mat1").propertyGroup("Garofalo").set("n_gar", "4.6");
    model.material("mat1").propertyGroup("ChabocheViscoplasticity").set("A_cha", "1[1/s]");
    model.material("mat1").propertyGroup("ChabocheViscoplasticity").set("sigRef_cha", "490[MPa]");
    model.material("mat1").propertyGroup("ChabocheViscoplasticity").set("n_cha", "9");

//    In the tree, select Composites > Laminae > Unidirectional fiber lamina: AS4/APC2 carbon/PEEK thermoplastic [fiber volume fraction 58%].
//    Right-click and choose Add to Global Materials.

    model.material().create("mat2", "Common", "");
    model.material("mat2").propertyGroup()
         .create("OrthotropicStrengthParameters", "OrthotropicStrengthParameters", "Orthotropic strength parameters, Voigt notation");
    model.material("mat2").propertyGroup()
         .create("TransverseIsotropic", "TransverseIsotropic", "Transversely isotropic");
    model.material("mat2")
         .label("Unidirectional fiber lamina: AS4/APC2 carbon/PEEK thermoplastic [fiber volume fraction 58%]");
    model.material("mat2").propertyGroup("def").set("density", "1570[kg/m^3]");
    model.material("mat2").propertyGroup("def")
         .setPropertyInfo("density", "Reference: I. M. Daniel and O. Ishai, Engineering Mechanics of Composite Materials, Oxford University Press, Second Edition, 2006.");
    model.material("mat2").propertyGroup("def")
         .set("thermalexpansioncoefficient", new String[]{"-0.2E-6[1/K]", "0", "0", "0", "24E-6[1/K]", "0", "0", "0", "24E-6[1/K]"});
    model.material("mat2").propertyGroup("def")
         .setPropertyInfo("thermalexpansioncoefficient", "Reference: I. M. Daniel and O. Ishai, Engineering Mechanics of Composite Materials, Oxford University Press, Second Edition, 2006.");
    model.material("mat2").propertyGroup("OrthotropicStrengthParameters")
         .set("sigmats", new String[]{"2060[MPa]", "78[MPa]", "78[MPa]"});
    model.material("mat2").propertyGroup("OrthotropicStrengthParameters")
         .setPropertyInfo("sigmats", "Reference: I. M. Daniel and O. Ishai, Engineering Mechanics of Composite Materials, Oxford University Press, Second Edition, 2006.");
    model.material("mat2").propertyGroup("OrthotropicStrengthParameters")
         .set("sigmacs", new String[]{"1590[MPa]", "200[MPa]", "200[MPa]"});
    model.material("mat2").propertyGroup("OrthotropicStrengthParameters")
         .setPropertyInfo("sigmacs", "Reference: I. M. Daniel and O. Ishai, Engineering Mechanics of Composite Materials, Oxford University Press, Second Edition, 2006.");
    model.material("mat2").propertyGroup("OrthotropicStrengthParameters")
         .set("sigmass", new String[]{"157[MPa]", "157[MPa]", "157[MPa]"});
    model.material("mat2").propertyGroup("OrthotropicStrengthParameters")
         .setPropertyInfo("sigmass", "Reference: I. M. Daniel and O. Ishai, Engineering Mechanics of Composite Materials, Oxford University Press, Second Edition, 2006.");
    model.material("mat2").propertyGroup("TransverseIsotropic").set("Evect", new String[]{"138[GPa]", "8.7[GPa]"});
    model.material("mat2").propertyGroup("TransverseIsotropic")
         .setPropertyInfo("Evect", "Reference: I. M. Daniel and O. Ishai, Engineering Mechanics of Composite Materials, Oxford University Press, Second Edition, 2006.");
    model.material("mat2").propertyGroup("TransverseIsotropic").set("nuvect", new String[]{"0.28", "0.45"});
    model.material("mat2").propertyGroup("TransverseIsotropic")
         .setPropertyInfo("nuvect", "Reference: I. M. Daniel and O. Ishai, Engineering Mechanics of Composite Materials, Oxford University Press, Second Edition, 2006.");
    model.material("mat2").propertyGroup("TransverseIsotropic").set("Gvect1", "5[GPa]");
    model.material("mat2").propertyGroup("TransverseIsotropic")
         .setPropertyInfo("Gvect1", "Reference: I. M. Daniel and O. Ishai, Engineering Mechanics of Composite Materials, Oxford University Press, Second Edition, 2006.");

//    In the Materials toolbar, click Add Material to close the Add Material window.
//    In the Model Builder window, right-click Global Definitions > Materials and choose Layered Material.

    model.material().create("lmat1", "LayeredMaterial", "");

//    In the Settings window for Layered Material, locate the Layer Definition section.
//    In the table, enter the following settings:

    model.material("lmat1").setIndex("link", "mat2", 0);
    model.material("lmat1").setIndex("thickness", "1e-2[m]", 0);
    model.material("lmat1").setIndex("tag", "lmat1_1", 0);
    model.material("lmat1").setIndex("meshPoints", 1, 0);
    model.material("lmat1").setIndex("tag", "lmat1_1", 0);

//    Click Add.

    model.material("lmat1").setIndex("layername", "Layer 2", 1);
    model.material("lmat1").setIndex("link", "mat2", 1);
    model.material("lmat1").setIndex("rotation", "0.0", 1);
    model.material("lmat1").setIndex("rotationValue", "\u2013", 1);
    model.material("lmat1").setIndex("thickness", "1e-2[m]", 1);
    model.material("lmat1").setIndex("meshPoints", 1, 1);
    model.material("lmat1").setIndex("tag", "lmat1_2", 1);
    model.material("lmat1").setIndex("layername", "Layer 2", 1);
    model.material("lmat1").setIndex("link", "mat2", 1);
    model.material("lmat1").setIndex("rotation", "0.0", 1);
    model.material("lmat1").setIndex("rotationValue", "\u2013", 1);
    model.material("lmat1").setIndex("thickness", "1e-2[m]", 1);
    model.material("lmat1").setIndex("meshPoints", 1, 1);
    model.material("lmat1").setIndex("tag", "lmat1_2", 1);

//    In the table, enter the following settings:

    model.material("lmat1").setIndex("rotation", 45, 1);
    model.material("lmat1").setIndex("tag", "lmat1_2", 1);

//    In the Model Builder window, right-click Component 1 (comp1) > Materials and choose Layers > Layered Material Link.

    model.component("comp1").material().create("llmat1", "LayeredMaterialLink");

//    In the Settings window for Layered Material Link, locate the Boundary Selection section.
//    Click Clear Selection.

    model.component("comp1").material("llmat1").selection().set();

//    Click Paste Selection.
//    In the Paste Selection dialog, type 11-13, 25, 37, 69 in the Selection text field.
//    Click OK.

    model.component("comp1").material("llmat1").selection().set(11, 12, 13, 25, 37, 69);

//    In the Settings window for Layered Material Link, locate the Orientation and Position section.
//    From the Position list, select Bottom side on boundary.

    model.component("comp1").material("llmat1").set("middlePlane", "bottom");

//    Right-click Materials and choose More Materials > Material Link.

    model.component("comp1").material().create("matlnk1", "Link");

//    In the Settings window for Material Link, locate the Geometric Entity Selection section.
//    Click Paste Selection.
//    In the Paste Selection dialog, type 3-6, 8, 9, 11, 12 in the Selection text field.
//    Click OK.

    model.component("comp1").material("matlnk1").selection().set(3, 4, 5, 6, 8, 9, 11, 12);

//    In the Settings window for Material Link, locate the Link Settings section.
//    From the Material list, select Unidirectional fiber lamina: AS4/APC2 carbon/PEEK thermoplastic [fiber volume fraction 58%] (mat2).

    model.component("comp1").material("matlnk1").set("link", "mat2");

//    Right-click Materials and choose More Materials > Material Link.

    model.component("comp1").material().create("matlnk2", "Link");

//    In the Settings window for Material Link, locate the Geometric Entity Selection section.
//    Click Paste Selection.
//    In the Paste Selection dialog, type 1, 2, 7, 10 in the Selection text field.
//    Click OK.

    model.component("comp1").material("matlnk2").selection().set(1, 2, 7, 10);

//    Set linear elastic material in all physics interfaces to orthotropic. The isotropic properties of <l>Structural Steel</l> is automatically converted to orthotropic properties.
//    Set the discretization of <l>Solid Mechanics</l> interface to quadratic Lagrange in order to have a proper structural connection with other interfaces having quadratic Lagrange discretization.
//    In the Model Builder window, under Component 1 (comp1), click Solid Mechanics (solid).
//    In the Settings window for Solid Mechanics, click to expand the Discretization section.
//    From the Displacement field list, select Quadratic Lagrange.

    model.component("comp1").physics("solid").prop("ShapeProperty").set("order_displacement", 2);

//    In the Model Builder window, under Component 1 (comp1) > Solid Mechanics (solid), click Linear Elastic Material 1.
//    In the Settings window for Linear Elastic Material, locate the Linear Elastic Material section.
//    From the Material symmetry list, select Orthotropic.

    model.component("comp1").physics("solid").feature("lemm1").set("SolidModel", "Orthotropic");

//    In the Physics toolbar, click Domains and choose Linear Elastic Material.

    model.component("comp1").physics("solid").create("lemm2", "LinearElasticModel", 3);

//    In the Settings window for Linear Elastic Material, locate the Linear Elastic Material section.
//    From the Material symmetry list, select Orthotropic.

    model.component("comp1").physics("solid").feature("lemm2").set("SolidModel", "Orthotropic");

//    Locate the Domain Selection section.
//    Click Paste Selection.
//    In the Paste Selection dialog, type 4, 6, 9, 12 in the Selection text field.
//    Click OK.

    model.component("comp1").physics("solid").feature("lemm2").selection().set(4, 6, 9, 12);

//    In the Definitions toolbar, click Coordinate Systems and choose Rotated System.

    model.component("comp1").coordSystem().create("sys2", "Rotated");

//    In the Settings window for Rotated System, locate the Rotation section.
//    Find the Euler angles subsection.
//    In the α text field, type pi/4.

    model.component("comp1").coordSystem("sys2").set("angle", new String[]{"pi/4", "0", "0"});

//    In the Model Builder window, under Component 1 (comp1) > Solid Mechanics (solid), click Linear Elastic Material 2.
//    In the Settings window for Linear Elastic Material, locate the Coordinate System Selection section.
//    From the Coordinate system list, select Rotated System 2 (sys2).

    model.component("comp1").physics("solid").feature("lemm2").set("coordinateSystem", "sys2");

//    The solid domains form a geometric union. To disconnect two adjacent domains, add an <l>Auxiliary Slit</l> feature. To see the feature you first need to enable the <l>Equation-Based Contributions</l>.
//    Click the Show More Options button in the Model Builder toolbar.
//    In the Show More Options dialog, in the tree, select the checkbox for the Physics > Equation Contributions node.
//    Click OK.
//    In the Physics toolbar, click Boundaries and choose Auxiliary Slit.

    model.component("comp1").physics("solid").create("asl1", "AuxiliarySlit", 2);

//    In the Settings window for Auxiliary Slit, locate the Boundary Selection section.
//    Click Paste Selection.
//    In the Paste Selection dialog, type 57 in the Selection text field.
//    Click OK.

    model.component("comp1").physics("solid").feature("asl1").selection().set(57);

//    In any node in the Model Builder, you can add comments to explain the settings. Right click on the node to select the <l>Properties and Comments</l> option to add the comment.

    model.component("comp1").physics("solid").feature("asl1")
         .comments("This feature disconnect the displacement field on either sides of selected boundaries, thus creating a discontinuity along the selected boundaries.");

//    In the Physics toolbar, click Boundaries and choose Boundary Load.

    model.component("comp1").physics("solid").create("bndl1", "BoundaryLoad", 2);

//    Select Boundaries 20, 33.

    model.component("comp1").physics("solid").feature("bndl1").selection().set(20, 33);

//    In the Settings window for Boundary Load, locate the Force section.
//    From the Load type list, select Total force.

    model.component("comp1").physics("solid").feature("bndl1").set("forceType", "TotalForce");

//    Specify the \[\mathbf{F}_{\mathrm{tot}}\] vector as

    model.component("comp1").physics("solid").feature("bndl1").set("force", new String[]{"0", "0", "F"});

//    In the Physics toolbar, click Boundaries and choose Fixed Constraint.

    model.component("comp1").physics("solid").create("fix1", "Fixed", 2);

//    In the Settings window for Fixed Constraint, locate the Boundary Selection section.
//    Click Paste Selection.
//    In the Paste Selection dialog, type 1, 6, 43, 45, 48, 60, 82, 83 in the Selection text field.
//    Click OK.

    model.component("comp1").physics("solid").feature("fix1").selection().set(1, 6, 43, 45, 48, 60, 82, 83);

//    In the Model Builder window, under Component 1 (comp1), click Layered Shell (lshell).
//    In the Settings window for Layered Shell, locate the Boundary Selection section.
//    Click Clear Selection.

    model.component("comp1").physics("lshell").selection().set();

//    Click Paste Selection.
//    In the Paste Selection dialog, type 11-13, 25 in the Selection text field.
//    Click OK.

    model.component("comp1").physics("lshell").selection().set(11, 12, 13, 25);

//    In the Physics toolbar, click Boundaries and choose Face Load.

    model.component("comp1").physics("lshell").create("fl1", "FaceLoad", 2);

//    In the Settings window for Face Load, locate the Boundary Selection section.
//    From the Selection list, select All boundaries.

    model.component("comp1").physics("lshell").feature("fl1").selection().all();

//    Locate the Interface Selection section.
//    From the Apply to list, select Top interface.

    model.component("comp1").physics("lshell").feature("fl1").set("applyTo", "top");

//    Locate the Force section.
//    From the Load type list, select Total force.

    model.component("comp1").physics("lshell").feature("fl1").set("forceType", "TotalForce");

//    Specify the \[\mathbf{F}_{\mathrm{tot}}\] vector as

    model.component("comp1").physics("lshell").feature("fl1").set("force", new String[]{"0", "0", "F"});

//    In the Model Builder window, under Component 1 (comp1), click Shell (shell).
//    In the Settings window for Shell, locate the Boundary Selection section.
//    Click Clear Selection.

    model.component("comp1").physics("shell").selection().set();

//    Click Paste Selection.
//    In the Paste Selection dialog, type 37, 69 in the Selection text field.
//    Click OK.

    model.component("comp1").physics("shell").selection().set(37, 69);

//    Add <l>Linear Elastic Material, Layered</l> to shell interface and set it to orthotropic.
//    In the Physics toolbar, click Boundaries and choose Linear Elastic Material, Layered.

    model.component("comp1").physics("shell").create("llem1", "LayeredElastic", 2);

//    In the Settings window for Linear Elastic Material, Layered, locate the Linear Elastic Material section.
//    From the Material symmetry list, select Orthotropic.

    model.component("comp1").physics("shell").feature("llem1").set("SolidModel", "Orthotropic");

//    Locate the Boundary Selection section.
//    Click Paste Selection.
//    In the Paste Selection dialog, type 37, 69 in the Selection text field.
//    Click OK.

    model.component("comp1").physics("shell").feature("llem1").selection().set(37, 69);

//    In the Physics toolbar, click Edges and choose Fixed Constraint.

    model.component("comp1").physics("shell").create("fix1", "Fixed", 1);

//    Select Edges 68, 163.

    model.component("comp1").physics("shell").feature("fix1").selection().set(68, 163);

//    Add different layered shell-structure multiphysics couplings for appropriate selections.
//    In the Physics toolbar, click Multiphysics Couplings and choose Global > Layered Shell–Structure Cladding.

    model.component("comp1").multiphysics().create("lssc1", "LayeredShellStructCladding", -1);

//    In the Settings window for Layered Shell–Structure Cladding, locate the Connection Settings section.
//    From the Layered shell boundary list, select Bottom.

    model.component("comp1").multiphysics("lssc1").set("LayeredShellBnd", "Bottom");

//    In the Physics toolbar, click Multiphysics Couplings and choose Edge > Layered Shell–Structure Transition.

    model.component("comp1").multiphysics().create("lsst1", "LayeredShellStructTransition", 1);

//    For this coupling only first layer is connected, so deselect the second layer. To get proper solid boundary selection activate the manual control of solid selections.
//    In the Settings window for Layered Shell–Structure Transition, locate the Shell Properties section.
//    Clear the Use all layers checkbox.

    model.component("comp1").multiphysics("lsst1").set("allLayers", false);

//    Specify the Selection vector as

    model.component("comp1").multiphysics("lsst1").setIndex("shelllist_lCheck", 0, 1, 0);

    return model;
  }

  public static Model run2(Model model) {

//    Locate the Edge Selection section.
//    Click Clear Selection.

    model.component("comp1").multiphysics("lsst1").selection().set();

//    Click Paste Selection.
//    In the Paste Selection dialog, type 74 in the Selection text field.
//    Click OK.

    model.component("comp1").multiphysics("lsst1").selection().set(74);

//    In the Settings window for Layered Shell–Structure Transition, locate the Connection Settings section.
//    Select the Manual control of selections checkbox.

    model.component("comp1").multiphysics("lsst1").set("selectionControl", true);

//    Locate the Boundary Selection, Solid section.
//    Click Clear Selection.

    model.component("comp1").multiphysics("lsst1").selection("edgBndSolidSelection").set();

//    Click Paste Selection.
//    In the Paste Selection dialog, type 39, 41 in the Selection text field.
//    Click OK.

    model.component("comp1").multiphysics("lsst1").selection("edgBndSolidSelection").set(39, 41);

//    In the Physics toolbar, click Multiphysics Couplings and choose Global > Layered Shell–Structure Cladding.

    model.component("comp1").multiphysics().create("lssc2", "LayeredShellStructCladding", -1);

//    In the Settings window for Layered Shell–Structure Cladding, locate the Coupled Interfaces section.
//    From the Structure list, select Shell (shell).

    model.component("comp1").multiphysics("lssc2").set("Shell_physics", "shell");

//    Locate the Connection Settings section.
//    From the Connection type list, select Parallel boundaries.

    model.component("comp1").multiphysics("lssc2").set("connectionSettings", "parallelBnd");

//    Locate the Boundary Selection, Layered Shell section.
//    Select the Activate Selection toggle button.
//    Select Boundary 25.

    model.component("comp1").multiphysics("lssc2").selection("paraBndLShellSelection").set(25);

//    Locate the Boundary Selection, Structure section.
//    Select the Activate Selection toggle button.
//    Select Boundary 69.

    model.component("comp1").multiphysics("lssc2").selection("paraBndShellSelection").set(69);

//    Locate the Connection Settings section.
//    From the Layered shell boundary list, select Bottom.

    model.component("comp1").multiphysics("lssc2").set("LayeredShellBnd", "Bottom");

//    From the Shell boundary list, select Top.

    model.component("comp1").multiphysics("lssc2").set("ShellBndParallel", "Top");

//    In the Physics toolbar, click Multiphysics Couplings and choose Edge > Layered Shell–Structure Transition.

    model.component("comp1").multiphysics().create("lsst2", "LayeredShellStructTransition", 1);

//    In the Settings window for Layered Shell–Structure Transition, locate the Coupled Interfaces section.
//    From the Structure list, select Shell (shell).

    model.component("comp1").multiphysics("lsst2").set("Shell_physics", "shell");

//    Locate the Edge Selection section.
//    Click Clear Selection.

    model.component("comp1").multiphysics("lsst2").selection().set();

//    Select Edge 69.

    model.component("comp1").multiphysics("lsst2").selection().set(69);

//    In the Mesh toolbar, click More Generators and choose Mapped.

    model.component("comp1").mesh("mesh1").create("map1", "Map");

//    In the Settings window for Mapped, locate the Boundary Selection section.
//    Click Paste Selection.
//    In the Paste Selection dialog, type 11, 13, 25, 37, 69 in the Selection text field.
//    Click OK.

    model.component("comp1").mesh("mesh1").feature("map1").selection().set(11, 13, 25, 37, 69);

//    In the Mesh toolbar, click Swept.

    model.component("comp1").mesh("mesh1").create("swe1", "Sweep");

//    In the Model Builder window, click Size.
//    In the Settings window for Size, locate the Element Size section.
//    Click the Custom button.

    model.component("comp1").mesh("mesh1").feature("size").set("custom", true);

//    Locate the Element Size Parameters section.
//    In the Maximum element size text field, type 0.03.

    model.component("comp1").mesh("mesh1").feature("size").set("hmax", 0.03);

//    In the Minimum element size text field, type 9.0E-4.

    model.component("comp1").mesh("mesh1").feature("size").set("hmin", 9.0E-4);

//    In the Maximum element growth rate text field, type 1.3.

    model.component("comp1").mesh("mesh1").feature("size").set("hgrad", 1.3);

//    In the Curvature factor text field, type 0.2.

    model.component("comp1").mesh("mesh1").feature("size").set("hcurve", 0.2);

//    In the Resolution of narrow regions text field, type 1.

    model.component("comp1").mesh("mesh1").feature("size").set("hnarrow", 1);

//    Click Build All.

    model.component("comp1").mesh("mesh1").run();

//    Switch off the generation of default plots, since for this study new custom plots are needed.
//    In the Model Builder window, click Study 1.
//    In the Settings window for Study, locate the Study Settings section.
//    Clear the Generate default plots checkbox.

    model.study("std1").setGenPlots(false);

//    In the Study toolbar, click Compute.

    model.study("std1").createAutoSequences("all");

    model.sol("sol1").runAll();

//    Set default units for result presentation.
//    In the Results toolbar, click Configurations and choose Preferred Units.

    model.result().configuration().create("prfu1", "PreferredUnits");

//    In the Settings window for Preferred Units, locate the Units section.
//    Click Add Physical Quantity.
//    In the Physical Quantity dialog, select General > Displacement (m) in the tree.
//    Click OK.

    model.result().configuration("prfu1")
         .setIndex("quantityunits", new String[]{"displacement", "Displacement", "m", "m"}, 0);

//    In the Settings window for Preferred Units, locate the Units section.
//    In the table, enter the following settings:

    model.result().configuration("prfu1").setIndex("quantityunits", "mm", 0, 3);

//    Click Add Physical Quantity.
//    In the Physical Quantity dialog, select Solid Mechanics > Stress tensor (N/m^2) in the tree.
//    Click OK.

    model.result().configuration("prfu1")
         .setIndex("quantityunits", new String[]{"stress", "Stress tensor", "N/m^2", "N/m^2"}, 1);

//    In the Settings window for Preferred Units, locate the Units section.
//    In the table, enter the following settings:

    model.result().configuration("prfu1").setIndex("quantityunits", "MPa", 1, 3);

//    Select the Apply conversions to expressions with the same dimensions checkbox.

    model.result().configuration("prfu1").set("applytosamedims", true);

//    Click Apply.

    model.result().configuration("prfu1").apply();

//    As generation of default plots are switched off, create custom <l>Layered Material</l> datasets and plots.
//    In the Results toolbar, click More Datasets and choose Layered Material.

    model.result().dataset().create("lshl1", "LayeredMaterial");

//    In the Results toolbar, click More Datasets and choose Layered Material.

    model.result().dataset().create("lshl2", "LayeredMaterial");

//    In the Settings window for Layered Material, locate the Layers section.
//    Find the Layer selection subsection.
//    Clear the Use all layers checkbox.

    model.result().dataset("lshl2").set("usealllayers", false);

//    Specify the vector as

    model.result().dataset("lshl2").setIndex("layerselection", false, 1, 0);

//    In the Label text field, type Layered Material: Bottom Layer.

    model.result().dataset("lshl2").label("Layered Material: Bottom Layer");

//    In the Results toolbar, click More Datasets and choose Layered Material.

    model.result().dataset().create("lshl3", "LayeredMaterial");

//    In the Settings window for Layered Material, type Layered Material: Top Layer in the Label text field.

    model.result().dataset("lshl3").label("Layered Material: Top Layer");

//    Locate the Layers section.
//    Find the Layer selection subsection.
//    Clear the Use all layers checkbox.

    model.result().dataset("lshl3").set("usealllayers", false);

//    Specify the vector as

    model.result().dataset("lshl3").setIndex("layerselection", false, 0, 0);

//    In the Model Builder window, collapse the Results > Datasets node.
//    In the Results toolbar, click 3D Plot Group.

    model.result().create("pg1", "PlotGroup3D");
    model.result("pg1").run();

//    In the Settings window for 3D Plot Group, type Stress in the Label text field.

    model.result("pg1").label("Stress");

//    Right-click Stress and choose Surface.

    model.result("pg1").create("surf1", "Surface");
    model.result("pg1").feature("surf1").set("evaluationsettings", "parent");

//    In the Settings window for Surface, locate the Expression section.
//    In the Expression text field, type solid.mises.

    model.result("pg1").feature("surf1").set("expr", "solid.mises");

//    Locate the Coloring and Style section.
//    From the Color table list, select Prism.

    model.result("pg1").feature("surf1").set("colortable", "Prism");

//    Click to expand the Range section.
//    Select the Manual color range checkbox.

    model.result("pg1").feature("surf1").set("rangecoloractive", true);

//    In the Maximum text field, type 10.

    model.result("pg1").feature("surf1").set("rangecolormax", 10);

//    Right-click Surface 1 and choose Deformation.

    model.result("pg1").feature("surf1").create("def1", "Deform");
    model.result("pg1").run();
    model.result("pg1").run();

//    In the Model Builder window, right-click Stress and choose Surface.

    model.result("pg1").create("surf2", "Surface");
    model.result("pg1").feature("surf2").set("evaluationsettings", "parent");

//    In the Settings window for Surface, locate the Data section.
//    From the Dataset list, select Layered Material 1.

    model.result("pg1").feature("surf2").set("data", "lshl1");

//    Locate the Expression section.
//    In the Expression text field, type lshell.mises.

    model.result("pg1").feature("surf2").set("expr", "lshell.mises");

//    Click to expand the Title section.
//    From the Title type list, select None.

    model.result("pg1").feature("surf2").set("titletype", "none");

//    Click to expand the Inherit Style section.
//    From the Plot list, select Surface 1.

    model.result("pg1").feature("surf2").set("inheritplot", "surf1");

//    Right-click Surface 2 and choose Deformation.

    model.result("pg1").feature("surf2").create("def1", "Deform");
    model.result("pg1").run();

//    In the Settings window for Deformation, locate the Expression section.
//    In the x-component text field, type u3.

    model.result("pg1").feature("surf2").feature("def1").set("expr", new String[]{"u3", "v", "w"});

//    In the y-component text field, type v3.

    model.result("pg1").feature("surf2").feature("def1").set("expr", new String[]{"u3", "v3", "w"});

//    In the z-component text field, type w3.

    model.result("pg1").feature("surf2").feature("def1").set("expr", new String[]{"u3", "v3", "w3"});
    model.result("pg1").run();

//    In the Model Builder window, right-click Stress and choose Surface.

    model.result("pg1").create("surf3", "Surface");
    model.result("pg1").feature("surf3").set("evaluationsettings", "parent");

//    In the Settings window for Surface, locate the Data section.
//    From the Dataset list, select Layered Material 1.

    model.result("pg1").feature("surf3").set("data", "lshl1");

//    Locate the Expression section.
//    In the Expression text field, type shell.mises.

    model.result("pg1").feature("surf3").set("expr", "shell.mises");

//    Locate the Title section.
//    From the Title type list, select None.

    model.result("pg1").feature("surf3").set("titletype", "none");

//    Locate the Inherit Style section.
//    From the Plot list, select Surface 1.

    model.result("pg1").feature("surf3").set("inheritplot", "surf1");

//    Right-click Surface 3 and choose Deformation.

    model.result("pg1").feature("surf3").create("def1", "Deform");
    model.result("pg1").run();

//    In the Settings window for Deformation, locate the Expression section.
//    In the x-component text field, type u2.

    model.result("pg1").feature("surf3").feature("def1").set("expr", new String[]{"u2", "v", "w"});

//    In the y-component text field, type v2.

    model.result("pg1").feature("surf3").feature("def1").set("expr", new String[]{"u2", "v2", "w"});

//    In the z-component text field, type w2.

    model.result("pg1").feature("surf3").feature("def1").set("expr", new String[]{"u2", "v2", "w2"});
    model.result("pg1").run();

//    In the Model Builder window, under Results, click Stress.
//    In the Stress toolbar, click More Plots and choose Table Annotation.

    model.result("pg1").create("tlan1", "TableAnnotation");

//    In the Settings window for Table Annotation, locate the Data section.
//    From the Source list, select Local table.

    model.result("pg1").feature("tlan1").set("source", "localtable");

//    In the table, enter the following settings:

    model.result("pg1").feature("tlan1").setIndex("localtablematrix", 1.5, 0, 0);
    model.result("pg1").feature("tlan1").setIndex("localtablematrix", 1.5, 0, 1);
    model.result("pg1").feature("tlan1").setIndex("localtablematrix", 0, 0, 2);
    model.result("pg1").feature("tlan1").setIndex("localtablematrix", "Layered Shell-Solid-Shell", 0, 3);
    model.result("pg1").feature("tlan1").setIndex("localtablematrix", 1.5, 1, 0);
    model.result("pg1").feature("tlan1").setIndex("localtablematrix", 4, 1, 1);
    model.result("pg1").feature("tlan1").setIndex("localtablematrix", 0, 1, 2);
    model.result("pg1").feature("tlan1").setIndex("localtablematrix", "Solid (Reference)", 1, 3);

//    Locate the Coloring and Style section.
//    Clear the Show point checkbox.

    model.result("pg1").feature("tlan1").set("showpoint", false);
    model.result("pg1").run();

//    In the Model Builder window, collapse the Results > Stress node.
//    In the Model Builder window, click Stress.
//    In the Stress toolbar, click Plot.

    model.result("pg1").run();

//    Click the Go to Default View button in the Graphics toolbar.
//    Right-click Stress and choose Duplicate.

    model.result().duplicate("pg2", "pg1");
    model.result("pg2").run();

//    In the Settings window for 3D Plot Group, type Displacement in the Label text field.

    model.result("pg2").label("Displacement");
    model.result("pg2").run();

//    In the Model Builder window, expand the Displacement node, then click Surface 1.
//    In the Settings window for Surface, locate the Expression section.
//    In the Expression text field, type solid.disp.

    model.result("pg2").feature("surf1").set("expr", "solid.disp");

//    Locate the Range section.
//    Clear the Manual color range checkbox.

    model.result("pg2").feature("surf1").set("rangecoloractive", false);

//    Locate the Coloring and Style section.
//    From the Color table list, select SpectrumLight.

    model.result("pg2").feature("surf1").set("colortable", "SpectrumLight");
    model.result("pg2").run();

//    In the Model Builder window, click Surface 2.
//    In the Settings window for Surface, locate the Expression section.
//    In the Expression text field, type lshell.disp.

    model.result("pg2").feature("surf2").set("expr", "lshell.disp");
    model.result("pg2").run();

//    In the Model Builder window, click Surface 3.
//    In the Settings window for Surface, locate the Expression section.
//    In the Expression text field, type shell.disp.

    model.result("pg2").feature("surf3").set("expr", "shell.disp");
    model.result("pg2").run();

//    In the Model Builder window, collapse the Results > Displacement node.
//    In the Model Builder window, click Displacement.
//    In the Displacement toolbar, click Plot.

    model.result("pg2").run();

//    In the Results toolbar, click 3D Plot Group.

    model.result().create("pg3", "PlotGroup3D");
    model.result("pg3").run();

//    In the Settings window for 3D Plot Group, type Stress: Layered Shell, Bottom Layer in the Label text field.

    model.result("pg3").label("Stress: Layered Shell, Bottom Layer");

//    Right-click Stress: Layered Shell, Bottom Layer and choose Surface.

    model.result("pg3").create("surf1", "Surface");
    model.result("pg3").feature("surf1").set("evaluationsettings", "parent");

//    In the Settings window for Surface, locate the Expression section.
//    In the Expression text field, type misesBot_solid.

    model.result("pg3").feature("surf1").set("expr", "misesBot_solid");

//    Locate the Range section.
//    Select the Manual color range checkbox.

    model.result("pg3").feature("surf1").set("rangecoloractive", true);

//    In the Maximum text field, type 10.

    model.result("pg3").feature("surf1").set("rangecolormax", 10);

//    Locate the Coloring and Style section.
//    From the Color table list, select Prism.

    model.result("pg3").feature("surf1").set("colortable", "Prism");

//    Right-click Surface 1 and choose Duplicate.

    model.result("pg3").feature().duplicate("surf2", "surf1");
    model.result("pg3").run();

//    In the Settings window for Surface, locate the Data section.
//    From the Dataset list, select Layered Material: Bottom Layer.

    model.result("pg3").feature("surf2").set("data", "lshl2");

//    Locate the Expression section.
//    In the Expression text field, type lshell.mises.

    model.result("pg3").feature("surf2").set("expr", "lshell.mises");

//    Locate the Title section.
//    From the Title type list, select None.

    model.result("pg3").feature("surf2").set("titletype", "none");

//    Locate the Inherit Style section.
//    From the Plot list, select Surface 1.

    model.result("pg3").feature("surf2").set("inheritplot", "surf1");
    model.result("pg3").run();

//    In the Model Builder window, collapse the Results > Stress: Layered Shell, Bottom Layer node.
//    In the Model Builder window, click Stress: Layered Shell, Bottom Layer.
//    In the Stress: Layered Shell, Bottom Layer toolbar, click Plot.

    model.result("pg3").run();

//    Right-click Stress: Layered Shell, Bottom Layer and choose Duplicate.

    model.result().duplicate("pg4", "pg3");
    model.result("pg4").run();

//    In the Settings window for 3D Plot Group, type Stress: Layered Shell, Top Layer in the Label text field.

    model.result("pg4").label("Stress: Layered Shell, Top Layer");
    model.result("pg4").run();

//    In the Model Builder window, expand the Stress: Layered Shell, Top Layer node, then click Surface 1.
//    In the Settings window for Surface, locate the Expression section.
//    In the Expression text field, type misesTop_solid.

    model.result("pg4").feature("surf1").set("expr", "misesTop_solid");
    model.result("pg4").run();

//    In the Model Builder window, click Surface 2.
//    In the Settings window for Surface, locate the Data section.
//    From the Dataset list, select Layered Material: Top Layer.

    model.result("pg4").feature("surf2").set("data", "lshl3");
    model.result("pg4").run();

//    In the Model Builder window, collapse the Results > Stress: Layered Shell, Top Layer node.
//    In the Model Builder window, click Stress: Layered Shell, Top Layer.
//    In the Stress: Layered Shell, Top Layer toolbar, click Plot.

    model.result("pg4").run();

//    In the Results toolbar, click 1D Plot Group.

    model.result().create("pg5", "PlotGroup1D");
    model.result("pg5").run();

//    In the Settings window for 1D Plot Group, type Stress, Layered Shell-Solid Cladding in the Label text field.

    model.result("pg5").label("Stress, Layered Shell-Solid Cladding");

//    Click to expand the Title section.
//    From the Title type list, select Label.

    model.result("pg5").set("titletype", "label");

//    Locate the Plot Settings section.
//    Select the x-axis label checkbox.

    model.result("pg5").set("xlabelactive", true);

//    In the associated text field, type Y-coordinate (m).

    model.result("pg5").set("xlabel", "Y-coordinate (m)");

//    Select the y-axis label checkbox.

    model.result("pg5").set("ylabelactive", true);

//    In the associated text field, type von Mises stress (MPa).

    model.result("pg5").set("ylabel", "von Mises stress (MPa)");

//    Right-click Stress, Layered Shell-Solid Cladding and choose Line Graph.

    model.result("pg5").create("lngr1", "LineGraph");
    model.result("pg5").feature("lngr1").set("markerpos", "datapoints");
    model.result("pg5").feature("lngr1").set("linewidth", "preference");
    model.result("pg5").feature("lngr1").set("evaluationsettings", "parent");

//    In the Settings window for Line Graph, locate the Selection section.
//    Click Paste Selection.
//    In the Paste Selection dialog, type 17, 19, 21 in the Selection text field.
//    Click OK.

    model.result("pg5").feature("lngr1").selection().set(17, 19, 21);

//    In the Settings window for Line Graph, locate the y-Axis Data section.
//    In the Expression text field, type misesTop_lshell.

    model.result("pg5").feature("lngr1").set("expr", "misesTop_lshell");

//    Click to expand the Legends section.
//    Select the Show legends checkbox.

    model.result("pg5").feature("lngr1").set("legend", true);

//    From the Legends list, select Manual.

    model.result("pg5").feature("lngr1").set("legendmethod", "manual");

//    In the table, enter the following settings:

    model.result("pg5").feature("lngr1").setIndex("legends", "Layered Shell", 0);

//    Right-click Line Graph 1 and choose Duplicate.

    model.result("pg5").feature().duplicate("lngr2", "lngr1");
    model.result("pg5").run();

//    In the Settings window for Line Graph, locate the Selection section.
//    Click Clear Selection.

    model.result("pg5").feature("lngr2").selection().set();

//    Click Paste Selection.
//    In the Paste Selection dialog, type 30 in the Selection text field.
//    Click OK.

    model.result("pg5").feature("lngr2").selection().set(30);

//    In the Settings window for Line Graph, locate the y-Axis Data section.
//    In the Expression text field, type solid.mises.

    model.result("pg5").feature("lngr2").set("expr", "solid.mises");

//    Click to expand the Coloring and Style section.
//    Find the Line style subsection.
//    From the Line list, select Dashed.

    model.result("pg5").feature("lngr2").set("linestyle", "dashed");

//    Locate the Legends section.
//    In the table, enter the following settings:

    model.result("pg5").feature("lngr2").setIndex("legends", "Solid (Reference)", 0);
    model.result("pg5").run();

//    In the Model Builder window, collapse the Results > Stress, Layered Shell-Solid Cladding node.
//    In the Model Builder window, click Stress, Layered Shell-Solid Cladding.
//    In the Stress, Layered Shell-Solid Cladding toolbar, click Plot.

    model.result("pg5").run();

//    Right-click Stress, Layered Shell-Solid Cladding and choose Duplicate.

    model.result().duplicate("pg6", "pg5");
    model.result("pg6").run();

//    In the Settings window for 1D Plot Group, type Stress, Layered Shell-Shell Cladding in the Label text field.

    model.result("pg6").label("Stress, Layered Shell-Shell Cladding");
    model.result("pg6").run();

//    In the Model Builder window, expand the Stress, Layered Shell-Shell Cladding node, then click Line Graph 1.
//    In the Settings window for Line Graph, locate the Selection section.
//    Click Clear Selection.

    model.result("pg6").feature("lngr1").selection().set();

//    Select Edge 151.

    model.result("pg6").feature("lngr1").selection().set(151);
    model.result("pg6").run();

//    In the Model Builder window, click Line Graph 2.
//    In the Settings window for Line Graph, locate the Selection section.
//    Click Clear Selection.

    model.result("pg6").feature("lngr2").selection().set();

//    Select Edge 156.

    model.result("pg6").feature("lngr2").selection().set(156);

//    Locate the x-Axis Data section.
//    From the Parameter list, select Reversed arc length.

    model.result("pg6").feature("lngr2").set("xdata", "reversedarc");
    model.result("pg6").run();

//    In the Model Builder window, collapse the Results > Stress, Layered Shell-Shell Cladding node.
//    In the Model Builder window, click Stress, Layered Shell-Shell Cladding.
//    In the Stress, Layered Shell-Shell Cladding toolbar, click Plot.

    model.result("pg6").run();

//    Right-click Stress, Layered Shell-Shell Cladding and choose Duplicate.

    model.result().duplicate("pg7", "pg6");
    model.result("pg7").run();

//    In the Settings window for 1D Plot Group, type Stress, Layered Shell-Shell Transition in the Label text field.

    model.result("pg7").label("Stress, Layered Shell-Shell Transition");

//    Locate the Plot Settings section.
//    In the x-axis label text field, type X-coordinate (m).

    model.result("pg7").set("xlabel", "X-coordinate (m)");
    model.result("pg7").run();

//    In the Model Builder window, expand the Stress, Layered Shell-Shell Transition node, then click Line Graph 1.
//    In the Settings window for Line Graph, locate the Selection section.
//    Click Clear Selection.

    model.result("pg7").feature("lngr1").selection().set();

//    Select Edges 18, 42, 69, 108.

    model.result("pg7").feature("lngr1").selection().set(18, 42, 69, 108);
    model.result("pg7").run();

//    In the Model Builder window, click Line Graph 2.
//    In the Settings window for Line Graph, locate the Selection section.
//    Click Clear Selection.

    model.result("pg7").feature("lngr2").selection().set();

//    Click Paste Selection.
//    In the Paste Selection dialog, type 31, 56, 92, 124 in the Selection text field.
//    Click OK.

    model.result("pg7").feature("lngr2").selection().set(31, 56, 92, 124);

//    In the Settings window for Line Graph, locate the x-Axis Data section.
//    From the Parameter list, select Arc length.

    model.result("pg7").feature("lngr2").set("xdata", "arc");
    model.result("pg7").run();

//    In the Model Builder window, collapse the Results > Stress, Layered Shell-Shell Transition node.
//    In the Model Builder window, click Stress, Layered Shell-Shell Transition.
//    In the Stress, Layered Shell-Shell Transition toolbar, click Plot.

    model.result("pg7").run();

//    Right-click Stress, Layered Shell-Shell Transition and choose Duplicate.

    model.result().duplicate("pg8", "pg7");
    model.result("pg8").run();

//    In the Settings window for 1D Plot Group, type Stress, Layered Shell-Solid Transition in the Label text field.

    model.result("pg8").label("Stress, Layered Shell-Solid Transition");
    model.result("pg8").run();

//    In the Model Builder window, expand the Stress, Layered Shell-Solid Transition node, then click Line Graph 1.
//    In the Settings window for Line Graph, locate the Selection section.
//    Click Clear Selection.

    model.result("pg8").feature("lngr1").selection().set();

//    Select Edges 23, 48, 74, 112.

    model.result("pg8").feature("lngr1").selection().set(23, 48, 74, 112);
    model.result("pg8").run();

//    In the Model Builder window, click Line Graph 2.
//    In the Settings window for Line Graph, locate the y-Axis Data section.
//    In the Expression text field, type misesTop_solid.

    model.result("pg8").feature("lngr2").set("expr", "misesTop_solid");

//    Locate the Selection section.
//    Click Clear Selection.

    model.result("pg8").feature("lngr2").selection().set();

//    Click Paste Selection.
//    In the Paste Selection dialog, type 40, 66, 101, 132 in the Selection text field.
//    Click OK.

    model.result("pg8").feature("lngr2").selection().set(40, 66, 101, 132);
    model.result("pg8").run();

//    In the Model Builder window, collapse the Results > Stress, Layered Shell-Solid Transition node.
//    In the Model Builder window, click Stress, Layered Shell-Solid Transition.
//    In the Stress, Layered Shell-Solid Transition toolbar, click Plot.

    model.result("pg8").run();
    model.result("pg3").run();

    model.title("Connecting Layered Shells with Solids and Shells");

    model
         .description("Layered shell elements, which are used for modeling composite shells, often connected to solid and shell elements in cladding or side-by-side configuration to represent a realistic structure. For such applications, it becomes important to connect layered shell element correctly and easily with other structural elements.\n\nIn this tutorial and verification problem, you will learn how to connect layered shell elements to solid and shell elements in different configurations. The results are also compared with the reference model built using solid elements.");

    return model;
  }

  public static void main(String[] args) {
    Model model = run();
    run2(model);
  }

}
