/*
 * journal_bearing_dynamic_coefficients.java
 */

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

/** Model exported on May 13 2026, 12:35 by COMSOL 6.4.0.419. */
public class journal_bearing_dynamic_coefficients {

  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 > Rotordynamics > Hydrodynamic Bearing (hdb).
//    Click Add.
//    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("hdb", "HydrodynamicBearing", "geom1");

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

//    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("R", "10[cm]");
    model.param().descr("R", "Journal radius");
    model.param().set("L", "2[cm]");
    model.param().descr("L", "Journal length");
    model.param().set("C", "100[um]");
    model.param().descr("C", "Clearance");
    model.param().set("Omega", "1000[rad/s]");
    model.param().descr("Omega", "Angular velocity");
    model.param().set("mu0", "20[mPa*s]");
    model.param().descr("mu0", "Lubricant viscosity");
    model.param().set("rho0", "866[kg/m^3]");
    model.param().descr("rho0", "Lubricant density");
    model.param().set("W", "500[N]");
    model.param().descr("W", "Static load on bearing");

//    In the Geometry toolbar, click Cylinder.

    model.component("comp1").geom("geom1").create("cyl1", "Cylinder");

//    In the Settings window for Cylinder, locate the Object Type section.
//    From the Type list, select Surface.

    model.component("comp1").geom("geom1").feature("cyl1").set("type", "surface");

//    Locate the Size and Shape section.
//    In the Radius text field, type R.

    model.component("comp1").geom("geom1").feature("cyl1").set("r", "R");

//    In the Height text field, type L.

    model.component("comp1").geom("geom1").feature("cyl1").set("h", "L");

//    Locate the Axis section.
//    From the Axis type list, select x-axis.

    model.component("comp1").geom("geom1").feature("cyl1").set("axistype", "x");

//    Click Build All Objects.

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

//    Define the variables for the analytical stiffness and damping.
//    In the Model Builder window, expand the Component 1 (comp1) > Definitions node.
//    Right-click Definitions and choose Variables.

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

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

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

    model.component("comp1").variable("var1").set("k0", "W/C");
    model.component("comp1").variable("var1").descr("k0", "Stiffness scaling");
    model.component("comp1").variable("var1").set("c0", "W/(C*Omega)");
    model.component("comp1").variable("var1").descr("c0", "Damping scaling");
    model.component("comp1").variable("var1").set("e", "hdb.hjb1.ec_rel");
    model.component("comp1").variable("var1").descr("e", "Eccentricity");
    model.component("comp1").variable("var1").set("phi0", "atan2(pi*sqrt(1-e^2),4*e)");
    model.component("comp1").variable("var1").descr("phi0", "Attitude angle");
    model.component("comp1").variable("var1").set("Q", "(pi^2+(16-pi^2)*e^2)^1.5");
    model.component("comp1").variable("var1").descr("Q", "Auxiliary variable");
    model.component("comp1").variable("var1").set("k22", "4*(16*e^2+pi^2*(2-e^2))/Q");
    model.component("comp1").variable("var1").descr("k22", "Dimensionless stiffness, 22 component");
    model.component("comp1").variable("var1").set("k23", "pi*(pi^2*(1-2*e^2+e^4)-16*e^4)/(e*sqrt(1-e^2)*Q)");
    model.component("comp1").variable("var1").descr("k23", "Dimensionless stiffness, 23 component");
    model.component("comp1").variable("var1")
         .set("k32", "-pi*(pi^2*(1+2*e^2)*(1-e^2)+32*e^2*(1+e^2))/(e*sqrt(1-e^2)*Q)");
    model.component("comp1").variable("var1").descr("k32", "Dimensionless stiffness, 32 component");
    model.component("comp1").variable("var1").set("k33", "4*(pi^2*(1+2*e^2)*(1-e^2)+32*e^2*(1+e^2))/((1-e^2)*Q)");
    model.component("comp1").variable("var1").descr("k33", "Dimensionless stiffness, 33 component");
    model.component("comp1").variable("var1").set("c22", "2*pi*sqrt(1-e^2)*(pi^2*(1+2*e^2)-16*e^2)/(e*Q)");
    model.component("comp1").variable("var1").descr("c22", "Dimensionless damping, 22 component");
    model.component("comp1").variable("var1").set("c23", "8*(16*e^2-pi^2*(1+2*e^2))/Q");
    model.component("comp1").variable("var1").descr("c23", "Dimensionless damping, 23 component");
    model.component("comp1").variable("var1").set("c32", "c23");
    model.component("comp1").variable("var1").descr("c32", "Dimensionless damping, 32 component");
    model.component("comp1").variable("var1").set("c33", "2*pi*(48*e^2+pi^2*(1-e^2)^2)/(e*sqrt(1-e^2)*Q)");
    model.component("comp1").variable("var1").descr("c33", "Dimensionless damping, 33 component");

//    In the Model Builder window, under Component 1 (comp1), click Hydrodynamic Bearing (hdb).
//    In the Settings window for Hydrodynamic Bearing, locate the Dynamic Coefficients section.
//    Select the Calculate dynamic coefficients checkbox.

    model.component("comp1").physics("hdb").prop("DynamicCoefficients").set("calculateDynamicCoefficients", true);

//    In the Model Builder window, under Component 1 (comp1) > Hydrodynamic Bearing (hdb), click Hydrodynamic Journal Bearing 1.
//    In the Settings window for Hydrodynamic Journal Bearing, locate the Bearing Properties section.
//    In the \[C\] text field, type C.

    model.component("comp1").physics("hdb").feature("hjb1").set("C_plain", "C");

//    From the \[\mathbf{X}_\textrm{c}\] list, select From geometry.

    model.component("comp1").physics("hdb").feature("hjb1").set("BearingCenterType", "fromGeom");

//    Locate the Journal Properties section.
//    From the Specify list, select Load.

    model.component("comp1").physics("hdb").feature("hjb1").set("Specify", "Load");

//    Specify the \[\mathbf{W}_\textrm{j}\] vector as

    model.component("comp1").physics("hdb").feature("hjb1").set("W", new String[]{"0", "0", "-W"});
    model.component("comp1").physics("hdb").feature("hjb1").set("uJInit", new int[]{0, 0, 0});

//    Specify the \[\mathbf{u}_\textrm{j0}\] vector as

    model.component("comp1").physics("hdb").feature("hjb1").set("uJInit", new int[]{0, 0, 0});

//    In the \[\mathbf{\Omega}\] text field, type Omega.

    model.component("comp1").physics("hdb").feature("hjb1").set("Ow", "Omega");

//    Locate the Fluid Properties section.
//    From the \[\mu\] list, select User defined.

    model.component("comp1").physics("hdb").feature("hjb1").set("mure_mat", "userdef");

//    In the associated text field, type mu0.

    model.component("comp1").physics("hdb").feature("hjb1").set("mure", "mu0");

//    From the \[\rho\] list, select User defined.

    model.component("comp1").physics("hdb").feature("hjb1").set("rho_mat", "userdef");

//    In the associated text field, type rho0.

    model.component("comp1").physics("hdb").feature("hjb1").set("rho", "rho0");

//    Use a mapped mesh to resolve the pressure.
//    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.
//    From the Selection list, select All boundaries.

    model.component("comp1").mesh("mesh1").feature("map1").selection().all();

//    Right-click Mapped 1 and choose Distribution.

    model.component("comp1").mesh("mesh1").feature("map1").create("dis1", "Distribution");

//    Select Edges 1, 2, 4, 6.

    model.component("comp1").mesh("mesh1").feature("map1").feature("dis1").selection().set(1, 2, 4, 6);

//    In the Settings window for Distribution, locate the Distribution section.
//    In the Number of elements text field, type 50.

    model.component("comp1").mesh("mesh1").feature("map1").feature("dis1").set("numelem", 50);

//    In the Model Builder window, right-click Mapped 1 and choose Distribution.

    model.component("comp1").mesh("mesh1").feature("map1").create("dis2", "Distribution");

//    Select Edge 7.

    model.component("comp1").mesh("mesh1").feature("map1").feature("dis2").selection().set(7);

//    In the Settings window for Distribution, locate the Distribution section.
//    In the Number of elements text field, type 12.

    model.component("comp1").mesh("mesh1").feature("map1").feature("dis2").set("numelem", 12);

//    Click Build All.

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

//    In the Model Builder window, under Study 1, click Step 1: Stationary.
//    In the Settings window for Stationary, click to expand the Study Extensions section.
//    Select the Auxiliary sweep checkbox.

    model.study("std1").feature("stat").set("useparam", true);

//    Click Add.

    model.study("std1").feature("stat").setIndex("pname", "R", 0);
    model.study("std1").feature("stat").setIndex("plistarr", "", 0);
    model.study("std1").feature("stat").setIndex("punit", "m", 0);
    model.study("std1").feature("stat").setIndex("pname", "R", 0);
    model.study("std1").feature("stat").setIndex("plistarr", "", 0);
    model.study("std1").feature("stat").setIndex("punit", "m", 0);

//    In the table, enter the following settings:

    model.study("std1").feature("stat").setIndex("pname", "W", 0);
    model.study("std1").feature("stat").setIndex("plistarr", "10^range(1,0.2,5)", 0);
    model.study("std1").feature("stat").setIndex("punit", "N", 0);

//    In the Study toolbar, click Compute.

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

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

    model.result().create("pg1", "PlotGroup3D");
    model.result("pg1").label("Fluid Pressure (hdb)");
    model.result("pg1").set("smooth", "internal");
    model.result("pg1").feature().create("surf1", "Surface");
    model.result("pg1").feature("surf1").set("colortable", "RainbowLight");
    model.result("pg1").feature("surf1").set("smooth", "internal");
    model.result("pg1").feature("surf1").set("data", "parent");
    model.result("pg1").feature().create("con1", "Contour");
    model.result("pg1").feature("con1").set("levelrounding", false);
    model.result("pg1").feature("con1").set("colorlegend", false);
    model.result("pg1").feature("con1").set("smooth", "internal");
    model.result("pg1").feature("con1").set("inherittubescale", false);
    model.result("pg1").feature("con1").set("data", "parent");
    model.result("pg1").feature("con1").set("inheritplot", "surf1");
    model.result("pg1").run();

//    In the Fluid Pressure (hdb) toolbar, click Plot.

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

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

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

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

    model.result("pg2").label("Eccentricity");

//    Right-click Eccentricity and choose Global.

    model.result("pg2").create("glob1", "Global");
    model.result("pg2").feature("glob1").set("markerpos", "datapoints");
    model.result("pg2").feature("glob1").set("linewidth", "preference");

//    In the Settings window for Global, click Replace Expression in the upper-right corner of the y-Axis Data section.
//    From the menu, choose Component 1 (comp1) > Hydrodynamic Bearing > Hydrodynamic Journal Bearing 1 > Eccentricity and attitude angle > hdb.hjb1.ec_rel - Relative eccentricity - 1.

    model.result("pg2").feature("glob1").set("expr", new String[]{"hdb.hjb1.ec_rel"});
    model.result("pg2").feature("glob1").set("descr", new String[]{"Relative eccentricity"});
    model.result("pg2").feature("glob1").set("unit", new String[]{"1"});

//    Click to expand the Coloring and Style section.
//    From the Width list, select 2.

    model.result("pg2").feature("glob1").set("linewidth", 2);

//    In the Eccentricity toolbar, click Plot.

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

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

    model.result("pg2").set("showlegends", false);
    model.result("pg2").run();

//    In the Model Builder window, click Eccentricity.
//    In the Settings window for 1D Plot Group, click to expand the Title section.
//    From the Title type list, select None.

    model.result("pg2").set("titletype", "none");

//    In the Eccentricity toolbar, click Plot.

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

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

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

//    In the Settings window for 1D Plot Group, type Attitude Angle in the Label text field.

    model.result("pg3").label("Attitude Angle");

//    Right-click Attitude Angle and choose Global.

    model.result("pg3").create("glob1", "Global");
    model.result("pg3").feature("glob1").set("markerpos", "datapoints");
    model.result("pg3").feature("glob1").set("linewidth", "preference");

//    In the Settings window for Global, click Replace Expression in the upper-right corner of the y-Axis Data section.
//    From the menu, choose Component 1 (comp1) > Hydrodynamic Bearing > Hydrodynamic Journal Bearing 1 > Eccentricity and attitude angle > hdb.hjb1.phia - Attitude angle - rad.

    model.result("pg3").feature("glob1").set("expr", new String[]{"hdb.hjb1.phia"});
    model.result("pg3").feature("glob1").set("descr", new String[]{"Attitude angle"});
    model.result("pg3").feature("glob1").set("unit", new String[]{"rad"});

//    Locate the y-Axis Data section.
//    In the table, enter the following settings:

    model.result("pg3").feature("glob1").setIndex("unit", "deg", 0);
    model.result("pg3").feature("glob1").setIndex("descr", "Attitude angle, COMSOL", 0);

//    Locate the Coloring and Style section.
//    From the Width list, select 3.

    model.result("pg3").feature("glob1").set("linewidth", 3);
    model.result("pg3").run();

//    In the Model Builder window, right-click Attitude Angle and choose Global.

    model.result("pg3").create("glob2", "Global");
    model.result("pg3").feature("glob2").set("markerpos", "datapoints");
    model.result("pg3").feature("glob2").set("linewidth", "preference");

//    In the Settings window for Global, locate the y-Axis Data section.
//    In the table, enter the following settings:

    model.result("pg3").feature("glob2").setIndex("expr", "phi0", 0);
    model.result("pg3").feature("glob2").setIndex("unit", "deg", 0);
    model.result("pg3").feature("glob2").setIndex("descr", "Attitude angle, Analytical", 0);

//    Locate the Coloring and Style section.
//    Find the Line style subsection.
//    From the Line list, select None.

    model.result("pg3").feature("glob2").set("linestyle", "none");

//    Find the Line markers subsection.
//    From the Marker list, select Cycle.

    model.result("pg3").feature("glob2").set("linemarker", "cycle");

//    From the Positioning list, select Interpolated.

    model.result("pg3").feature("glob2").set("markerpos", "interp");

//    In the Number text field, type 50.

    model.result("pg3").feature("glob2").set("markers", 50);

//    In the Attitude Angle toolbar, click Plot.

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

//    In the Model Builder window, click Attitude Angle.
//    In the Settings window for 1D Plot Group, locate the Plot Settings section.
//    Select the y-axis label checkbox.

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

//    In the associated text field, type Attitude Angle (deg).

    model.result("pg3").set("ylabel", "Attitude Angle (deg)");

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

    model.result("pg3").set("titletype", "none");
    model.result("pg2").run();

//    In the Model Builder window, right-click Eccentricity and choose Duplicate.

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

//    In the Settings window for 1D Plot Group, type Pressure and Film Thickness in the Label text field.

    model.result("pg4").label("Pressure and Film Thickness");
    model.result("pg4").run();

//    In the Model Builder window, expand the Pressure and Film Thickness node, then click Global 1.
//    In the Settings window for Global, click Replace Expression in the upper-right corner of the y-Axis Data section.
//    From the menu, choose Component 1 (comp1) > Hydrodynamic Bearing > Pressure > hdb.hjb1.p_max - Maximum bearing pressure - Pa.

    model.result("pg4").feature("glob1").set("expr", new String[]{"hdb.hjb1.p_max"});
    model.result("pg4").feature("glob1").set("descr", new String[]{"Maximum bearing pressure"});
    model.result("pg4").feature("glob1").set("unit", new String[]{"Pa"});

//    Right-click Results > Pressure and Film Thickness > Global 1 and choose Duplicate.

    model.result("pg4").feature().duplicate("glob2", "glob1");
    model.result("pg4").run();

//    In the Settings window for Global, click Replace Expression in the upper-right corner of the y-Axis Data section.
//    From the menu, choose Component 1 (comp1) > Hydrodynamic Bearing > Journal and bearing properties > Film thickness and clearance > hdb.hjb1.h_min - Minimum film thickness - m.

    model.result("pg4").feature("glob2").set("expr", new String[]{"hdb.hjb1.h_min"});
    model.result("pg4").feature("glob2").set("descr", new String[]{"Minimum film thickness"});
    model.result("pg4").feature("glob2").set("unit", new String[]{"m"});
    model.result("pg4").run();

//    In the Model Builder window, click Pressure and Film Thickness.
//    In the Settings window for 1D Plot Group, locate the Plot Settings section.
//    Select the Two y-axes checkbox.

    model.result("pg4").set("twoyaxes", true);

//    In the table, enter the following settings:

    model.result("pg4").setIndex("plotonsecyaxis", true, 1, 1);

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

    model.result("pg4").set("showlegends", true);

//    Locate the Legend section.
//    From the Position list, select Upper middle.

    model.result("pg4").set("legendpos", "uppermiddle");

//    In the Pressure and Film Thickness 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 Bearing Stiffness in the Label text field.

    model.result("pg5").label("Bearing Stiffness");

//    Right-click Bearing Stiffness and choose Global.

    model.result("pg5").create("glob1", "Global");
    model.result("pg5").feature("glob1").set("markerpos", "datapoints");
    model.result("pg5").feature("glob1").set("linewidth", "preference");

//    In the Settings window for Global, click Add Expression in the upper-right corner of the y-Axis Data section.
//    From the menu, choose Component 1 (comp1) > Hydrodynamic Bearing > Dynamic coefficients > Translational stiffness coefficient - N/m > hdb.hjb1.k22 - Translational stiffness coefficient, 22-component.

    model.result("pg5").feature("glob1").set("expr", new String[]{"hdb.hjb1.k22"});
    model.result("pg5").feature("glob1")
         .set("descr", new String[]{"Translational stiffness coefficient, 22-component"});

//    Locate the y-Axis Data section.
//    In the table, enter the following settings:

    model.result("pg5").feature("glob1").setIndex("expr", "hdb.hjb1.k22", 0);
    model.result("pg5").feature("glob1").setIndex("descr", "k<sub>22</sub>, COMSOL", 0);
    model.result("pg5").feature("glob1").setIndex("expr", "abs(hdb.hjb1.k23)", 1);
    model.result("pg5").feature("glob1").setIndex("descr", "|k<sub>23</sub>|, COMSOL", 1);
    model.result("pg5").feature("glob1").setIndex("expr", "-hdb.hjb1.k32", 2);
    model.result("pg5").feature("glob1").setIndex("descr", "-k<sub>32</sub>, COMSOL", 2);
    model.result("pg5").feature("glob1").setIndex("expr", "hdb.hjb1.k33", 3);
    model.result("pg5").feature("glob1").setIndex("descr", "k<sub>33</sub>, COMSOL", 3);

//    Locate the Coloring and Style section.
//    From the Width list, select 3.

    model.result("pg5").feature("glob1").set("linewidth", 3);

//    Click the y-Axis Log Scale button in the Graphics toolbar.

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

//    Click the x-Axis Log Scale button in the Graphics toolbar.

    model.result("pg5").set("xlog", true);
    model.result("pg5").run();

//    In the Model Builder window, right-click Bearing Stiffness and choose Global.

    model.result("pg5").create("glob2", "Global");
    model.result("pg5").feature("glob2").set("markerpos", "datapoints");
    model.result("pg5").feature("glob2").set("linewidth", "preference");

//    In the Settings window for Global, locate the y-Axis Data section.
//    In the table, enter the following settings:

    model.result("pg5").feature("glob2").setIndex("expr", "k22*k0", 0);
    model.result("pg5").feature("glob2").setIndex("descr", "k<sub>22</sub>, Analytical", 0);
    model.result("pg5").feature("glob2").setIndex("expr", "abs(k23*k0)", 1);
    model.result("pg5").feature("glob2").setIndex("descr", "|k<sub>23</sub>|, Analytical", 1);
    model.result("pg5").feature("glob2").setIndex("expr", "-k32*k0", 2);
    model.result("pg5").feature("glob2").setIndex("descr", "-k<sub>32</sub>, Analytical", 2);
    model.result("pg5").feature("glob2").setIndex("expr", "k33*k0", 3);
    model.result("pg5").feature("glob2").setIndex("descr", "k<sub>33</sub>, Analytical", 3);

//    Locate the Coloring and Style section.
//    Find the Line style subsection.
//    From the Line list, select None.

    model.result("pg5").feature("glob2").set("linestyle", "none");

//    From the Color list, select Cycle (reset).

    model.result("pg5").feature("glob2").set("linecolor", "cyclereset");

//    Find the Line markers subsection.
//    From the Marker list, select Circle.

    model.result("pg5").feature("glob2").set("linemarker", "circle");
    model.result("pg5").run();

//    In the Model Builder window, click Bearing Stiffness.
//    In the Settings window for 1D Plot Group, locate the Title section.
//    From the Title type list, select Manual.

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

//    In the Title text area, type Bearing Stiffness.

    model.result("pg5").set("title", "Bearing Stiffness");

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

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

//    In the associated text field, type Bearing Load (N).

    model.result("pg5").set("xlabel", "Bearing Load (N)");

//    Select the y-axis label checkbox.

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

//    In the associated text field, type Stiffness Coefficient (N/m).

    model.result("pg5").set("ylabel", "Stiffness Coefficient (N/m)");

//    Locate the Legend section.
//    From the Position list, select Upper left.

    model.result("pg5").set("legendpos", "upperleft");

//    In the Number of columns text field, type 2.

    model.result("pg5").set("legendcolumncount", 2);

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

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

//    In the Settings window for 1D Plot Group, type Bearing Damping in the Label text field.

    model.result("pg6").label("Bearing Damping");

//    Right-click Bearing Damping and choose Global.

    model.result("pg6").create("glob1", "Global");
    model.result("pg6").feature("glob1").set("markerpos", "datapoints");
    model.result("pg6").feature("glob1").set("linewidth", "preference");

//    In the Settings window for Global, click Add Expression in the upper-right corner of the y-Axis Data section.
//    From the menu, choose Component 1 (comp1) > Hydrodynamic Bearing > Dynamic coefficients > Translational damping coefficient - N·s/m > hdb.hjb1.c22 - Translational damping coefficient, 22-component.

    model.result("pg6").feature("glob1").set("expr", new String[]{"hdb.hjb1.c22"});
    model.result("pg6").feature("glob1")
         .set("descr", new String[]{"Translational damping coefficient, 22-component"});

//    Locate the y-Axis Data section.
//    In the table, enter the following settings:

    model.result("pg6").feature("glob1").setIndex("expr", "hdb.hjb1.c22", 0);
    model.result("pg6").feature("glob1").setIndex("unit", 1, 0);
    model.result("pg6").feature("glob1").setIndex("descr", "-c<sub>22</sub>, COMSOL", 0);
    model.result("pg6").feature("glob1").setIndex("expr", "-hdb.hjb1.c23", 1);
    model.result("pg6").feature("glob1").setIndex("unit", 1, 1);
    model.result("pg6").feature("glob1").setIndex("descr", "-c<sub>23</sub>, COMSOL", 1);
    model.result("pg6").feature("glob1").setIndex("expr", "-hdb.hjb1.c32", 2);
    model.result("pg6").feature("glob1").setIndex("unit", 1, 2);
    model.result("pg6").feature("glob1").setIndex("descr", "-c<sub>32</sub>, COMSOL", 2);
    model.result("pg6").feature("glob1").setIndex("expr", "hdb.hjb1.c33", 3);
    model.result("pg6").feature("glob1").setIndex("unit", 1, 3);
    model.result("pg6").feature("glob1").setIndex("descr", "c<sub>33</sub>, COMSOL", 3);

//    Locate the Coloring and Style section.
//    From the Width list, select 3.

    model.result("pg6").feature("glob1").set("linewidth", 3);

//    Click the y-Axis Log Scale button in the Graphics toolbar.

    model.result("pg6").set("ylog", true);

//    Click the x-Axis Log Scale button in the Graphics toolbar.

    model.result("pg6").set("xlog", true);
    model.result("pg6").run();

//    In the Model Builder window, right-click Bearing Damping and choose Global.

    model.result("pg6").create("glob2", "Global");
    model.result("pg6").feature("glob2").set("markerpos", "datapoints");
    model.result("pg6").feature("glob2").set("linewidth", "preference");

//    In the Settings window for Global, locate the y-Axis Data section.
//    In the table, enter the following settings:

    model.result("pg6").feature("glob2").setIndex("expr", "c22*c0", 0);
    model.result("pg6").feature("glob2").setIndex("unit", 1, 0);
    model.result("pg6").feature("glob2").setIndex("descr", "c<sub>22</sub>, Analytical", 0);
    model.result("pg6").feature("glob2").setIndex("expr", "-c23*c0", 1);
    model.result("pg6").feature("glob2").setIndex("unit", 1, 1);
    model.result("pg6").feature("glob2").setIndex("descr", "-c<sub>23</sub>, Analytical", 1);
    model.result("pg6").feature("glob2").setIndex("expr", "-c32*c0", 2);
    model.result("pg6").feature("glob2").setIndex("unit", 1, 2);
    model.result("pg6").feature("glob2").setIndex("descr", "-c<sub>32</sub>, Analytical", 2);
    model.result("pg6").feature("glob2").setIndex("expr", "c33*c0", 3);
    model.result("pg6").feature("glob2").setIndex("unit", 1, 3);
    model.result("pg6").feature("glob2").setIndex("descr", "c<sub>33</sub>, Analytical", 3);

//    Locate the Coloring and Style section.
//    Find the Line style subsection.
//    From the Line list, select None.

    model.result("pg6").feature("glob2").set("linestyle", "none");

//    From the Color list, select Cycle (reset).

    model.result("pg6").feature("glob2").set("linecolor", "cyclereset");

//    Find the Line markers subsection.
//    From the Marker list, select Circle.

    model.result("pg6").feature("glob2").set("linemarker", "circle");

//    In the Bearing Damping toolbar, click Plot.

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

//    In the Model Builder window, click Bearing Damping.
//    In the Settings window for 1D Plot Group, locate the Title section.
//    From the Title type list, select Manual.

    model.result("pg6").set("titletype", "manual");

//    In the Title text area, type Bearing Damping.

    model.result("pg6").set("title", "Bearing Damping");

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

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

//    In the associated text field, type Bearing Load (N).

    model.result("pg6").set("xlabel", "Bearing Load (N)");

//    Select the y-axis label checkbox.

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

//    In the associated text field, type Damping Coefficient (N*s/m).

    model.result("pg6").set("ylabel", "Damping Coefficient (N*s/m)");

//    Locate the Legend section.
//    From the Position list, select Upper left.

    model.result("pg6").set("legendpos", "upperleft");

//    In the Number of columns text field, type 2.

    model.result("pg6").set("legendcolumncount", 2);
    model.result("pg5").run();

    model.title("Evaluation of Dynamic Coefficients of a Cylindrical Journal Bearing");

    model
         .description("When analyzing rotors, it is common that bearings are modeled through their effective dynamic coefficients about a static equilibrium position. This model illustrates how to compute such coefficients for a cylindrical journal bearing. The bearing length is kept much smaller than its diameter in order to verify that the calculated coefficients match corresponding analytical values for a short bearing approximation.");

    return model;
  }

  public static void main(String[] args) {
    run();
  }

}
