Skip to content

Note

Click here to download the full example code

Overview of the BendingTestAnalytical for load case ThreePoints

An analytical model for the bending of a parallelepipedic beam

from __future__ import annotations

from vimseo import EXAMPLE_RUNS_DIR
from vimseo.api import create_model
from vimseo.core.model_settings import IntegratedModelSettings

First, let's instantiate the model for a given load case:

model_name = "BendingTestAnalytical"
load_case = "ThreePoints"
model = create_model(
    model_name,
    load_case,
    check_subprocess=True,
    model_options=IntegratedModelSettings(
        directory_archive_root=EXAMPLE_RUNS_DIR / "archive/model_gallery",
        directory_scratch_root=EXAMPLE_RUNS_DIR / "scratch/model_gallery",
        cache_file_path=EXAMPLE_RUNS_DIR
        / f"caches/model_gallery/{model_name}_{load_case}_cache.hdf",
    ),
)

The model description can be accessed like this:

print(model.description)

Out:

Model BendingTestAnalytical:  An analytical model for the bending of a parallelepipedic beam

Load case:
   Load case ThreePoints: A three-points load case.

   Boundary condition variables:
   ['imposed_dplt', 'relative_support_location']

   Plot parameters:
   {
    "curves": []
}
   Load:
   Load(direction='', sign='', type='')

Default values:

   Default geometrical variables:
   {"height": [40.0], "length": [600.0], "width": [30.0]}

   Default numerical variables:
   {}

   Default boundary conditions variables:
   {"imposed_dplt": [-5.0], "relative_support_location": [0.5]}

   Default material variables:
   {"nu_p": [0.3], "young_modulus": [210000.0]}
model_inputs:
   [
    "length",
    "width",
    "height",
    "imposed_dplt",
    "relative_support_location",
    "young_modulus",
    "nu_p"
]
model_outputs:
   [
    "reaction_forces",
    "maximum_dplt",
    "dplt_grid",
    "location_max_dplt",
    "dplt",
    "moment",
    "moment_grid",
    "dplt_at_force_location",
    "error_code",
    "model",
    "load_case",
    "description",
    "job_name",
    "persistent_result_files",
    "n_cpus",
    "date",
    "cpu_time",
    "user",
    "machine",
    "vims_git_version",
    "directory_archive_root",
    "directory_archive_job",
    "directory_scratch_root",
    "directory_scratch_job"
]

An illustration of the load case:

model.show_image()

plot BendingTestAnalytical ThreePoints

The model is executed with its default input values:

model.execute()

Out:

{'young_modulus': array([210000.]), 'nu_p': array([0.3]), 'length': array([600.]), 'width': array([30.]), 'height': array([40.]), 'imposed_dplt': array([-5.]), 'relative_support_location': array([0.5]), 'cpu_time': array([0.02276325]), 'date': array(['2026-03-26 14:54:12.126714'], dtype='<U26'), 'description': array([''], dtype='<U1'), 'directory_archive_job': array(['/home/sebastien.bocquet/PycharmProjects/vimseo/docs/runnable_examples/model_runs/archive/model_gallery/BendingTestAnalytical/ThreePoints/2'],
      dtype='<U138'), 'directory_archive_root': array(['/home/sebastien.bocquet/PycharmProjects/vimseo/docs/runnable_examples/model_runs/archive/model_gallery'],
      dtype='<U102'), 'directory_scratch_job': array([''], dtype='<U1'), 'directory_scratch_root': array(['/home/sebastien.bocquet/PycharmProjects/vimseo/docs/runnable_examples/model_runs/scratch/model_gallery'],
      dtype='<U102'), 'dplt': array([-2.52346299e-19, -1.51499692e-01, -3.02875712e-01, -4.54004384e-01,
       -6.04762037e-01, -7.55024997e-01, -9.04669592e-01, -1.05357215e+00,
       -1.20160899e+00, -1.34865645e+00, -1.49459084e+00, -1.63928851e+00,
       -1.78262577e+00, -1.92447895e+00, -2.06472438e+00, -2.20323838e+00,
       -2.33989729e+00, -2.47457742e+00, -2.60715511e+00, -2.73750669e+00,
       -2.86550847e+00, -2.99103678e+00, -3.11396796e+00, -3.23417833e+00,
       -3.35154421e+00, -3.46594194e+00, -3.57724784e+00, -3.68533823e+00,
       -3.79008945e+00, -3.89137781e+00, -3.98907965e+00, -4.08307130e+00,
       -4.17322908e+00, -4.25942931e+00, -4.34154833e+00, -4.41946245e+00,
       -4.49304802e+00, -4.56218135e+00, -4.62673877e+00, -4.68659661e+00,
       -4.74163119e+00, -4.79171884e+00, -4.83673589e+00, -4.87655867e+00,
       -4.91106350e+00, -4.94012670e+00, -4.96362461e+00, -4.98143356e+00,
       -4.99342986e+00, -4.99948985e+00, -4.99948985e+00, -4.99342986e+00,
       -4.98143356e+00, -4.96362461e+00, -4.94012670e+00, -4.91106350e+00,
       -4.87655867e+00, -4.83673589e+00, -4.79171884e+00, -4.74163119e+00,
       -4.68659661e+00, -4.62673877e+00, -4.56218135e+00, -4.49304802e+00,
       -4.41946245e+00, -4.34154833e+00, -4.25942931e+00, -4.17322908e+00,
       -4.08307130e+00, -3.98907965e+00, -3.89137781e+00, -3.79008945e+00,
       -3.68533823e+00, -3.57724784e+00, -3.46594194e+00, -3.35154421e+00,
       -3.23417833e+00, -3.11396796e+00, -2.99103678e+00, -2.86550847e+00,
       -2.73750669e+00, -2.60715511e+00, -2.47457742e+00, -2.33989729e+00,
       -2.20323838e+00, -2.06472438e+00, -1.92447895e+00, -1.78262577e+00,
       -1.63928851e+00, -1.49459084e+00, -1.34865645e+00, -1.20160899e+00,
       -1.05357215e+00, -9.04669592e-01, -7.55024997e-01, -6.04762037e-01,
       -4.54004384e-01, -3.02875712e-01, -1.51499692e-01, -1.55887944e-17]), 'dplt_at_force_location': array([-4.99948985]), 'dplt_grid': array([  0.        ,   6.06060606,  12.12121212,  18.18181818,
        24.24242424,  30.3030303 ,  36.36363636,  42.42424242,
        48.48484848,  54.54545455,  60.60606061,  66.66666667,
        72.72727273,  78.78787879,  84.84848485,  90.90909091,
        96.96969697, 103.03030303, 109.09090909, 115.15151515,
       121.21212121, 127.27272727, 133.33333333, 139.39393939,
       145.45454545, 151.51515152, 157.57575758, 163.63636364,
       169.6969697 , 175.75757576, 181.81818182, 187.87878788,
       193.93939394, 200.        , 206.06060606, 212.12121212,
       218.18181818, 224.24242424, 230.3030303 , 236.36363636,
       242.42424242, 248.48484848, 254.54545455, 260.60606061,
       266.66666667, 272.72727273, 278.78787879, 284.84848485,
       290.90909091, 296.96969697, 303.03030303, 309.09090909,
       315.15151515, 321.21212121, 327.27272727, 333.33333333,
       339.39393939, 345.45454545, 351.51515152, 357.57575758,
       363.63636364, 369.6969697 , 375.75757576, 381.81818182,
       387.87878788, 393.93939394, 400.        , 406.06060606,
       412.12121212, 418.18181818, 424.24242424, 430.3030303 ,
       436.36363636, 442.42424242, 448.48484848, 454.54545455,
       460.60606061, 466.66666667, 472.72727273, 478.78787879,
       484.84848485, 490.90909091, 496.96969697, 503.03030303,
       509.09090909, 515.15151515, 521.21212121, 527.27272727,
       533.33333333, 539.39393939, 545.45454545, 551.51515152,
       557.57575758, 563.63636364, 569.6969697 , 575.75757576,
       581.81818182, 587.87878788, 593.93939394, 600.        ]), 'error_code': array([0]), 'job_name': array([''], dtype='<U1'), 'load_case': array(['ThreePoints'], dtype='<U11'), 'location_max_dplt': array([296.96969697]), 'machine': array(['IPF7101'], dtype='<U7'), 'maximum_dplt': array([-4.99948985]), 'model': array(['BendingTestAnalytical'], dtype='<U21'), 'moment': array([       0., -5600000.,        0.]), 'moment_grid': array([  0., 300., 600.]), 'n_cpus': array([1]), 'persistent_result_files': array([''], dtype='<U1'), 'reaction_forces': array([-37333.33333333]), 'user': array(['sebastien.bocquet'], dtype='<U17'), 'vims_git_version': array(['d0050d8de498c8354552cdde540fb3e524454871'], dtype='<U40')}

And the results are visualised with the pre-defined plots:

figures = model.plot_results(show=True)

Plot of dplt_vs_dplt_grid

figures["dplt_vs_dplt_grid"]

Plot of moment_vs_moment_grid

figures["moment_vs_moment_grid"]

Total running time of the script: ( 0 minutes 1.309 seconds)

Download Python source code: plot_BendingTestAnalytical_ThreePoints.py

Download Jupyter notebook: plot_BendingTestAnalytical_ThreePoints.ipynb

Gallery generated by mkdocs-gallery