Predicting the end of service life of an engineering structure, or obtaining parameters from inverse analysis of measured forces or displacements, is a complex task which requires deep knowledge of material behaviour and software development. In this paper it is shown how these two procedures can be carried out by writing a subroutine with the software MATLAB to run with predefined input data, pre- and post-processing a finite element model in PLAXIS 3D. The examples show how it is possible to predict the rest of service life of an airport pavement and to obtain layer stifness parameters from inverse analysis of a three-dimensional deflection bowl. The developed MATLAB routines allow the field of possible PLAXIS 3D applications to be extended considerably.
Pavement service life prediction and inverse analysis with PLAXIS 3D
Multi-stage excavation of a tunnel with rockbolts
In this video we demonstrate how to set up a multi-stage tunnel exvacation, how to model rockbolts and show how to inspect relevant results.
Changing embedded pile connection type might be not taken into account in the calculation
Problem description
The embedded beam (or embedded pile as the element was called in 3D 2013 version and older) connection type (rigid/hinged/fixed) is not updated in the data structure in the files used by the calculation kernel, when changing from one connection type to another (in Structures mode). This may result in incorrect input data for the calculations and may lead to unexpected results in Output.
In order to ensure whether the correct connection type is used in the calculations, please check the following for the embedded pile(s) in Output:
- bending moments transferred at the connection point
- displacements on the connection point between the structure and soil (e.g. select post-calculation nodes on both the soil and the structure and create a graph)
Solution
To solve the problem you can force the change of the connection type to be written to the data files for the calculation kernel for all phases by using the following command:
__writephasestomeshTrue
Then, by re-calculating your project, you will have the correct connection type of the embedded beam(s) applied. This can all be achieved by using these commands in the Commands Runner directly after changing the connection type:
gotostages__writephasestomeshTruecalculateTrue
For more information on the command used, please check the Command reference (Help menu).
This issue will be fixed in the upcoming release of PLAXIS 3D.
CodeMeter network error during calculation (IPv4/v6 conflict)
With the release for PLAXIS 2D 2015 and PLAXIS 3D AE some small changes in the communication with the licence dongle (CodeMeter) have been implemented. Together with the new CodeMeter drivers, running a CodeMeter network server can sometimes give issues. due to an IPv4/IPv6 conflict. In these cases the program may respond with this error during the calculation:
One of the following licenses is required: CodeMeter 100444:2000000. Failure reason: CodeMeter License Server not found, Error 101.
Fortunately, there are two solutions for this: on the server machine you will need
- to set the bind address for the server (prefered method, but only works for static IP addresses for the CodeMeter server),
- or to change the IPv4/IPv6 setting from automatic setting to IPv4 only.
Both methods need changes on the server. For Windows based machines, this require changes in the Windows Registry.
1. Set Bind address
- on the server, open the Windows Registry
- go to the key HKEY_LOCAL_MACHINE\SOFTWARE\WIBU-SYSTEMS\CodeMeter\Server\CurrentVersion
- find the parameter BindAddress Image may be NSFW.
Clik here to view. - change the value of the key “BindAddress” from “0.0.0.0” to the IP-address the server should use for communicating with the client computers.
- Afterwards the CodeMeter service needs to be restarted so that the change takes effect (see below).
- Please be aware that it only makes sense in case that the server has a static IP address
2. Change communication mode to IPv4 only
- on the server, open the Windows Registry
- go to the key HKEY_LOCAL_MACHINE\SOFTWARE\WIBU-SYSTEMS\CodeMeter\Server\CurrentVersion
- find the parameter ApiCommunicationMode
- change its value to 6 to allow for IPv4 and local use only (no IPv6): Image may be NSFW.
Clik here to view. - Then restart the CodeMeter service on the server (see below)
Finally: Restart CodeMeter
For both methods, after making the changes, the CodeMeter services on the server need to be restarted: open the CodeMeter Control Center, and restart the CodeMeter service by first stop it and then start it:
Image may be NSFW.
Clik here to view.
For other trouble shooting for network licence setups, please see the general CodeMeter Network installation page.
Change temporary folder for intermediate calculation data files
Sometimes when modelling large PLAXIS project files with e.g. a lot of phases or a lot of steps, Plaxis may indicate that there is not enough disk space available:
- PLAXIS 2D AE and PLAXIS 3D store all unsaved data in the Windows temporary folder (TEMP). By default, this is located on the primary disk drive in the user profile. Only when explicitly saving the Plaxis project data, this data will be stored in (i.e. moved to) the actual save location.
- Next to that, during a calculation all intermediate results (step files) are kept in the same location, and only when the phase calculation has finished, will the data be post-processed by keeping the number of result step files as specified in the Max number of steps stored parameter for that phase, and deleting the other data.
When this issue of not enough free disk space appears, you can use one of these available work arounds:
- Store the Windows TEMP folder on a disk with larger space. To do so, open Windows’s Control panel, and go to System > Advanced System settings, and in the tab Advanced, open the Environment Variables... window. Here you can set the current user’s variable TEMP to the desired new location. Note: the user might need to have administrator rights to perform this.
- For projects with a lot of phases, it may help to not calculate the entire Plaxis project in one go, but to calculate a part of the Plaxis project, save the model, and calculate the remainder of the Plaxis project. By saving the data halfway the calculation phases, the data stored in the Windows TEMP folder will be moved to the final save location, freeing up disk space for the Windows TEMP folder.
Note that this can be automated using the commands runner,e.g.
calculate Phase_1
save
calculate Phase_2
save
calculate Phase_3
save
etc. - For dynamic calculations only the data for a step is stored, not for a dynamic substep. If not all intermediate results need to be kept, or if not for each step a data point for the curve points is needed, the number of additional steps (Max steps) can be reduced. Please make sure to simultaneously increase the number of dynamic substeps, such that the product Max steps * Number of sub steps is kept constant, see this article: Time step used in dynamic calculation
- Since PLAXIS 2D AE.02 and PLAXIS 3D AE, there is an option to store the intermediate calculation result data in a different location. This is especially useful when for instance running a long dynamics calculation with a lot of steps in a single phase and the above mentioned options do not give the solution for enough free disk space. In order to change the location of this intermediate calculation data, the program needs to be launched with an additional parameter, called --CALCDIR. Example: to start PLAXIS 2D AE/2015 and later from the default installation folder while setting the calculation folder (CALCDIR) to D:\PlaxisCalc\
"C:\Program Files (x86)\Plaxis\Plaxis 2D\Plaxis2DXInput.exe""--CALCDIR=D:\PlaxisCalc\"
For PLAXIS 3D AE this would be:
"C:\Program Files (x86)\Plaxis\Plaxis 3D\Plaxis3DInput.exe""--CALCDIR=D:\PlaxisCalc\"
This can be used in e.g. a DOS command, in Windows Start menu’s Run..., from a batch file (*.bat), or be defined in a Windows shortcut.
Please be aware when moving the folder where the intermediate (calculation) results are stored (option 1 and 4) to a disk with less read/write speed, it may lead to a longer calculation time.
Re-use materials from other projects
Soil materials, as well as plate materials are sometimes used in more than one Plaxis project file, for instance, when analysing alternatives or for models located close to each other. In Plaxis software the global material database can be used as a repository of material data sets. Then, these material data sets can be used for new projects.
The procedure described below covers the following topics:
- changing the global material database of a project
- creating a new global material database
- add existing material data sets to the global material database
Note that the global material database can be created and used to add material data sets, such as for soils and interfaces, plates, embedded beam rows (or embedded beams in 3D), geogrids, beams (only in 3D) and anchors.
Change global material database
The steps to change the global material database are explained in detail below:
- Start a new project in Plaxis (or load an existing project);
- Open the material sets window and expand the global materials (the current location of the global material database can be seen below); Image may be NSFW.
Clik here to view. - Click on Select… to change the current global material database;
- Browse to the location of the global material database that is intended to be used;
- Select the global material file (*.matdb), e.g. Sands_only.matdb and click on Open.Image may be NSFW.
Clik here to view.
Create a new global material database
Sometimes there is no existing global material database or a new one is required. The steps to create a new global material database are explained in detail below:
- Start a new project in Plaxis;
- Open the material sets window and expand the global materials;
- Click on Select… to open the window of global material database location;
- Browse to the location in which the new global material database will be placed (this can also be a network location);
- Create a new folder and name it accordingly, e.g. Global;
- Specify a filename, e.g. sands_only.matdb;
- Now the global material database for e.g. Soil and interfaces is changed and the list of the global materials should be empty.
Adding existing material data sets to the global material database
The steps to add existing materials to this global material database are:
- Open a project, which includes the material data set(s);
- Make sure that you have selected the new global material database (checks step of the previous procedure);
- Use one of these methods to copy all or individual datasets from the local project material database to the global material database:
- button to copy only the selected material data set from the project material database to the global database;
- button to copy all material data sets from the project material database to the global material database;
- use drag-and-drop to copy individual material data sets from the project material database to the global one;
- Perform steps 1-3 for different projects from which you need the material data sets.
For a new project, you can now select the new global database and copy any of the global material data sets in the project material database.
An example of a Global material database can be seen below:Image may be NSFW.
Clik here to view.
Note that using any material database, which is included in a project folder (data.plxmat) as a global material database should be avoided: unexpected behaviour might be noticed (e.g. material assignments might be lost in the original project).
Instead, the materials used in this specific project can be copied to a global material database (*.matdb-file), following the steps mentioned above.
Incorrect data for centerline with an offset tunnel
Problem description
The data used to add a centerline From tunnel designer in PLAXIS Output are not correctly updated in the case of having an offset in the tunnel begin point position (General tab in the tunnel designer). This means that the centerline added in the Output program will not correspond to the updated position, resulting in wrong results for structural forces in volumes.
The problem can occur in two situations, when:
- generating a tunnel with an offset and a thick lining from the beginning [SOLVED SINCE 2D2015.02]
- editing the offset of an existing tunnel along with its thick lining (still occurs in 2D2015.02)
Image may be NSFW.
Clik here to view.
Figure .1 Output structural forces view: Centerline not updated when having tunnel with offset
Solution
One of the two problems has been solved in 2D2015.02: when you already have defined the offset before generating a thick lining, the centerline will be determined correctly. However, if after generating a thick lining you change the location of the tunnel (e.g. via Offset), the tunnel file is not updated anymore, resulting in the originally defined location.
We are working on a solution. For now we have this work around:
- To be able to update the centerline, manual editing of the data file is required. The related data file is located inside the project folder and by default it is named as data.otnl. The text format of the file is based on JSON (JavaScript Object Notation) and can be edited using any text editor, e.g. notepad from Windows. See the examples below:
- Creating a tunnel and thick lining with offset and
- Editing offset of an existing tunnel with thick lining
- For more information on the structure of the data.otnl file refer to the related article on Create centerline for Structural Forces in Volumes
1. Creating a tunnel and thick lining with offset
In the case of an arc type, the origin coordinates need to be updated. The offset displayed in the tunnel designer should be subtracted from the existing coordinates of the origin of the arc, in order to have the correct centerline data.
In the case of polyline, the coordinates of all points need to be updated. The offset displayed in the tunnel designer should be subtracted from the existing coordinates of the points of the polyline, in order to have the correct centerline data.
Example
Offset to begin point:
Axis 1 : 5.000
Axis 2 : 1.000
Existing data
Arc type:
"origin": [6.5, 1.3]
Polyline type:
"points" : [ [4.25, 1], [5.5, 3.5], [6.75, 1], [4.25, 1] ]
Corrected data
Arc type:
"origin": [1.5, 0.3]
Polyline type:
"points" : [ [-1.25, 0], [0.5, 2.5], [1.75, 0], [-1.25, 0] ]
2. Editing offset of an existing tunnel with thick lining
In the case of an arc type, the origin coordinates needs to be updated. The offset displayed in the tunnel designer should be added to the existing coordinates of the origin of the arc, in order to have the correct centerline data.
In the case of polyline, the coordinates of all points need to be updated. The offset displayed in the tunnel designer should be added to the existing coordinates of the points of the polyline, in order to have the correct centerline data.
Example
Offset to begin point is:
Axis 1 : 5.000
Axis 2 : 1.000
Existing data
Arc type:
"origin": [6.5, 1.3]
Polyline type:
"points" : [ [4.25, 1], [5.5, 3.5], [6.75, 1], [4.25, 1] ]
Corrected data
Arc type:
"origin": [11.5, 2.3]
Polyline type:
"points" : [ [9.25, 2], [10.5, 4.5], [11.75, 2], [9.25, 1] ]
Unable to access corrupted material database with thermal properties
Problem description
When materials of a global material database are shared between a PLAXIS 2D and PLAXIS 3D version, an error might occur when trying to access the materials. After encountering this problem the material database will not be accessible anymore through the latest installed version. This issue occurs due to additional information included for the materials in the latest versions of PLAXIS 2D and 3D. When trying to access the materials in the PLAXIS Input program it will result in a bug report:
Image may be NSFW.
Clik here to view.
When looking more into the details (show bug report), the first line in the call stacks will refer to an error in
TNumericalBlock.CopyValuesToBuffer
Image may be NSFW.
Clik here to view.
The combination of versions in which it is possible to encounter this issue are listed in the following table:
PLAXIS 2D 2015.00 | PLAXIS 3D 2013.01 or earlier 3D PLAXIS versions |
PLAXIS 2D 2015.01 | PLAXIS 3D 2013.01 or earlier 3D PLAXIS versions |
PLAXIS 2D AE.02 or earlier 2D PLAXIS versions | PLAXIS 3D AE.00 |
The issue does not occur if you have the latest version installed for both programs (2D 2015.01 or later and 3D AE.00 or later).
Solution
This issie is now resolved in PLAXIS 2D 2015.02, and an update for PLAXIS 3D is coming soon.
In order to solve the problem with your existing database files, please open the Plaxis program with the oldest version, which is installed in your computer.
The simplest solution would be to remove the materials from the global database that were added in the older PLAXIS version after installing the latest version.
If this is not possible, then, do the following:
- Select to create a new project in the non-latest version (e.g. PLAXIS 2D AE or PLAXIS 3D 2013)
- Then open the material datasets window and select the option to "show global" on the right top of the window
- You can copy all the soil materials, which are saved in the “Global materials” to the “Project materials” by using the arrows, which are in the middle of the window.
- Save this project (the project will be a plain project which will only contain materials)
- Find the location of your global material database (see picture) Image may be NSFW.
Clik here to view. - Please go to this location in your computer and delete the and delete the referred file
- You can now open with the non-latest PLAXIS version the project you just created (step 4) with the materials and put the materials back in the global database. In this way you create a new and updated global database.
This issue will be resolved in the upcoming update.
How to check undrained shear strength using Undrained A?
For Undrained A materials, where effective stress parameters are used, the undrained shear strength is not an input parameter but a result of the analysis. In order to check that the shear stress values do not violate the undrained shear strength, the shear stress (σ_1-σ_3)/2 should be checked against the undrained shear strength s_u (or c_u) in the Output program.
In Figure 1 the shear stress in Point A is below the given undrained shear strength s_u (c_u) (from soil test or laboratory tests) , and so the undrained shear strength is not violated for this stress state. However, for the second (larger) Mohr Circle, the shear stress in point B is larger than the undrained shear strength, and so the strength criterion is violated.
Image may be NSFW.
Clik here to view.
Figure 1. Mohr Circles for evaluating shear strength
The undrained shear stress in the Output program can be seen via the menu item by selecting:
Stresses» Principal total stresses» (σ_1 - σ_3) / 2
Then you can select to view the desired results:
- by drawing a Image may be NSFW.
Clik here to view.Cross section
- or by using the Image may be NSFW.
Clik here to view.Hint box and move your mouse over the area of interest.
On the use of dynamic boundary conditions
While setting up a dynamic model you may choose from the following dynamic boundary conditions:
- none
- viscous
- compliant base
- free field
- tied degrees of freedom
None
When choosing “none” only the standard fixities are applied to this boundary so no special dynamic boundary conditions are used. To create a so called “fixed base” this option should be used along the base (i.e. y_min for PLAXIS 2D and z_min for PLAXIS 3D) of the model in combination with a line prescribed displacement. A fixed base is a fully reflective boundary.
Viscous boundaries
A viscous boundary consists of viscous dampers applied in x, and y, and z (for 3D) direction along the boundary. Viscous boundaries absorb the incoming wave energy. The viscous boundary conditions are in general used for problems where the dynamic source is inside the mesh.
Compliant base
The compliant base boundary condition is only available for the baseof the model: y_min for PLAXIS 2D and z_min for PLAXIS 3D. The compliant base is made up of a combination of a line prescribed displacement and a viscous boundary. Internally the prescribed displacement history is transferred into a load history. The combination of a load history and a viscous boundary allows for input of an earthquake motion while still absorbing incoming waves. This option is in general preferred for earthquake analysis.
Free field
The free field boundary conditions are only available for the lateral boundaries, i.e. x_min / x_max, and y_min / y_max (3D). The free field boundaries are made up of a combination of a load history and a viscous boundary. The load history is the load coming from the free field motion at this level. The combination of a load history and a viscous boundary allows for an input of an earthquake motion while still absorbing incoming waves. This option is in general preferred for earthquake analysis.
Tied degrees of freedom
The tied degree of freedom are only available for the lateral boundaries (i.e. x_min and x_max). This option will tie the nodes of the left and right model boundaries such that they will undergo the exact same displacements. This option allows for example for modelling a perfect one dimensional soil column to perform a site response analysis. Also see this related article for further information on the practical use of this feature.
Tied degrees of freedom is not yet available for PLAXIS 3D.
Note that in order to use the options compliant base and free field the manual creation of interface elements along the full model boundary in Structures mode is required. By creating an interface we create a so called node pair which allows for the necessary decoupling to be able to apply the input motion (load history) while also being able to absorb incoming waves. Also see this related article on interfaces for more information on node pairs.
Site response analysis and liquefaction evaluation
When an earthquake occurs, the seismic waves propagate from the source till the ground surface, causing ground shaking. The effects of an earthquake can be different, such as structural damages, landslides and soil liquefaction. In order to identify and mitigate the seismic hazards, appropriate earthquake engineering studies which involve different technical fields, such as geology, geotechnical and structural engineering, seismology are required.
One of the aspects that needs to be taken into consideration is the modification of the earthquake characteristics when seismic waves travel through the soil deposit, that acts as a filter.
Liquefaction
The term liquefaction is used to describe a variety of phenomena that occurs in saturated cohesionless soils under undrained conditions. Under static and cyclic loading, dry cohesionless soils tend to densify. If these soils are saturated and the applied load acts in a short time, as in the case of an earthquake, the tendency to densify causes an increase in excess pore pressures that cannot be rapidly dissipated and consequently a decrease in the effective stresses occurs. When this happens, the soil behaves as a fluid.
To establish if liquefaction will occur in a specific site subjected to a selected earthquake semi-empirical procedures or dynamic methods can be used. The semi-empirical procedures consist in the evaluation of a safety factor as the ratio of the cyclic shear stress required to cause liquefaction and the equivalent cyclic shear stress induced by the earthquake. The dynamic method is based on a one-dimensional wave propagation analysis in terms of effective stresses, which gives the possibility to calculate the pore pressure ratio at any depth.
Image may be NSFW.
Clik here to view.
In the attached document an example is given for a dynamics analysis performed with the PLAXIS 2D finite element code, aimed at modelling the onset of liquefaction in loose cohesionless soils.
Two different approaches, commonly used in engineering practice, are compared. First, the simplified procedure introduced by Seed & Idriss (1971) and updated by Idriss & Boulanger (2014) is carried out. The onset of liquefaction is determined by a curve which separates a liquefiable state from a non liquefiable state. This curve is built on the basis of a large number of case-histories. This approach is based on a series of coefficients that allow to "scale" the seismic event and the in situ conditions to a standard situation.
The second approach consists of a fully dynamic analysis by means of the finite element code PLAXIS 2D. In this case, it is important to select the appropriate dynamic boundary conditions and constitutive models to reproduce the behaviour of saturated soils under cyclic loads. The results of the PLAXIS calculation are in good agreement with the results of the simplified procedure, since the onset of liquefaction is successfully modelled in all the five sand layers.
Downloads
Energy saving while running multiple calculations
With PLAXIS 2D and 3D it is possible to calculate several PLAXIS projects using a combination of .bat-files and command log files by using this command line:
<installationfolder>\Plaxis3DInput.exe <projectfile> “--run=<command log file>”
see also the related article about the practical use of the commands runner using a batch-file.
After finishing these calculations, the computer will stay active and will consume power. Since the release of PLAXIS 2D AE and PLAXIS 3D 2013 , the program now includes an energy saving command:
__gogreen
Examples
__gogreen
This will instruct the computer to hibernate
__gogreen"poweroff"True60
This command will force the computer to shut down in 60 seconds. Useful to start a calculation at the end of the day/week and shut down the computer when the calculation is done.
Hint: Do not forget the call the save command prior to shutting down.
For further details, please refer to the PLAXIS 2D and/or 3D Command Reference in the program’s Help menu
Command line reference
Where can I find a reference for the Command Line?
In the PLAXIS 2D and 3D Input and Output programs, you can find the Commands Reference in the Help menu. This will open the full Commands and Objects reference for the Input program and the Output program.
Image may be NSFW.
Clik here to view.
[Solved] Interpolate pore pressures on volumes with vertical sides may give incorrect pore pressure distribution for PLAXIS 3D
Problem description
In some cases, when using the interpolate pore pressure option for soil volumes that have an (assumed) vertical side inside the model (e.g., a dry excavation with a retaining wall and a high water level outside the excavation, Figure 1), the interpolate pore pressure option may not give a correct result for the steady state pore pressures in the above mentioned versions.
Image may be NSFW.
Clik here to view.
Figure 1. Example of possible problematic geometry
with interpolate pore pressures outside a dry excavation
This is caused by the vertical side not being 100% vertical due to numerical tolerances (see Figure 2). This can result in a side that has a dry, deactivated cluster directly vertically above it. In the interpolate pore pressures option, the pore pressures will be interpolated vertically, so here directly at the side, the pore pressures may become equal to the pore pressure at the inside of the excavation. In this example this would be equal to the dry cluster: a zero pore pressure.
Image may be NSFW.
Clik here to view.
Figure 2. Slightly tilted wall including a slightly tilted soil
volume side outside the excavation (exaggerated)
When can this happen?
This was an issue in PLAXIS 3D 2013 and PLAXIS 3D AE.00 (and fixed since PLAXIS 3D AE.01)
Typical cases in which this can happen is when:
- you modelled an excavation boundary with a water pressure difference between the excavation side and the outside
- and when the excavation side is slightly tilted. This can happen for instance when the surface (wall) is created by extruding a line from the top level to the bottom level of the wall.
How to see this error
One of the easiest ways to check this, is to check if the pore pressure distribution (or groundwater head distribution) along this side. In the preview or results of this phase, hide all structural elements to show only the soil elements. Now check the shaded plot of water pressures and groundwater head values on this excavation side The head values should give a smooth transition over the volume with the interpolated pore pressures. If this is not the case, most likely the mentioned problem occurs in your model.
Solution
This issue is now solved in PLAXIS 3D AE.01
For older models to resolve this issue, a new mesh needs to be generated to force to regenerate and rewrite all water definitions for the calculation kernel.
When this issue occurs in previous versions, please change the settings for these clusters to a User-defined pore pressure distribution reflecting the volume’s top and bottom boundary pore pressure value.
Python commands reference
Commands reference
There is extensive documentation available for when using the Python wrapper for the Remote Scripting functionality: inside the Plaxis programs that support this Remote Scripting you can access the full Commands and Objects reference via the help menu. This will open an HTML based documentation.
See also Command line reference
The basics for starting the Remote Scripting and start using the Python wrapper to interact with Plaxis, can be found in the PLAXIS Reference manual's Appendices and here Using PLAXIS Remote scripting with the Python wrapper
Plaxis Commands in Python
This Commands and Object reference describes how to directly use the Commands in the Plaxis Command line. With this it is easy to construct the command to be used inside the Python wrapper:
- To call a command, prefix the command with the global object reference (in the boilerplate referred to as g) and add the parameters in brackets
- To refer to a Plaxis object, prefix the Plaxis object name also with this global ojbject reference.
In the examples below, we used the boilerplate code example from this page: Using PLAXIS Remote scripting with the Python wrapper, i.e. we can refer to g as the global object of the current open Plaxis model.
Add a borehole in PLAXIS 2D
Plaxis command | borehole5 |
Python equivalent | g.borehole( 5 ) |
Add a point in PLAXIS 2D
Plaxis command | point12 |
Python equivalent | g.point( 1, 2 ) |
Change the x-coordinate for a point
Setting a single value to a so-called intrinsic property can be achieved using different Python syntax:
Plaxis command | setPoint_1.x9.3 |
Python equivalent | g.set( g.Point_1, 9.3 ) |
g.Point_1.set(9.3) | |
g.Point_1 = 9.3 |
Info and Echo
Practically, sometimes it is useful to use the info and echo command in the PLAXIS Input program to get more details about an object. For instance when using it for the Colours object or for a point object Point_1 to obtain more info about the available parameters and their spelling, and to see which commands and attributes are available:
0010> echoColoursColours named "Colours"0011> infoColoursColours Commands: echo, commands, rename, set, info, setproperties Attributes: Apple, Aqua, BabyBlue, Black, BlackBerry, Blue, Brown, ... 0012> echoPoint_1Point named "Point_1" x: 5 y: 5 0013> infoPoint_1Point_1 Commands: echo, commands, rename, set, info, setproperties, movedisconnected Attributes: Name, Comments, UserFeatures, x, y, z
Practical tip to obtain Python command
A practical tip if you are trying to figure out what command to use in Python, is to do the action you want to perform by using the mouse and keyboard in the Graphical User Interface (GUI), and read the generated command in the Command Session pane. Then, this command should be easily transferable into a Python command.
Example: change the top of a borehole
In order to do this via the GUI, we need to open the Modify soil layers window and change the top of the first soil layer. e.g. we change it to y = 2 m:
Image may be NSFW.
Clik here to view.
This will generate the following command to apply the change from which we can create the Python equivalent:
Plaxis command | _setsoillayerlevelBorehole_102 |
Python equivalent | g.setsoillayerlevel( g.Borehole_1, 0, 2 ) |
For more documentation on the specific parameters for the used setsoillayerlevel command, or any other command, please refer to the Commands reference.
Python wrapper script examples
For more details on this Python wrapper and some code examples, please see the appendix on the Python HTTP REST API wrapper in the PLAXIS Reference manuals. In the Plaxis Knowledge Base you can also find some scripting examples which can be used as a basis of your own Python script. Please see the related pages below.
Output scripting example: get heave of excavation bottom
In this example, we will use Tutorial Lesson 3 (Tied back excavation) [link] as an example. In this case, we want to determine the maximum heave of the excavation bottom. In the final phase, Phase_6, the bottom of the excavation is located at Y = 20.0 m, with the left retaining wall at X = 40 m and the right retaining wall at X = 60 m.
Image may be NSFW.
Clik here to view.
In order to retrieve the maximum heave for this excavation bottom, we will use Output’s Remote Scripting environment with the Python wrapper:
- we will need to launch the Output scripting server, available via the Expert menu
- and we should make sure the Plaxis results are opened in the Output program
- next is that we will obtain all soil displacements
- from which we will filter out the nodes that are at the excavation bottom. Because the order of the nodes is the same in each of these getresults-lists , we can use the x and y coordinates to filter out the vertical displacements at the excavation bottom: so we will only use the data from the nodes between X= 40.0 m and X = 60.0 m, with Y = 20.0 m
- and from this we will obtain the maximum value for the vertical displacement uy.
Below is an example code how to achieve this.
localhostport_output = 10001 plaxis_path =r'C:\Program Files (x86)\Plaxis\PLAXIS 2D'#no trailing backslash!import imp found_module = imp.find_module('plxscripting', [plaxis_path]) plxscripting = imp.load_module('plxscripting', *found_module) from plxscripting.easy import* s_out, g_out = new_server('localhost', localhostport_output) #geometric limits for the bottom of the excavation: x_left = 40.0 x_right = 60.0 y_bottom = 20.0 #initialize defaults maxUy = 0.0 xAtMaxUy = 0.0 yAtMaxUy = 0.0 #obtain result tables from Output: soilX = g_out.getresults(g_out.Phase_6, g_out.ResultTypes.Soil.X, 'node') soilY = g_out.getresults(g_out.Phase_6, g_out.ResultTypes.Soil.Y, 'node') soilUy = g_out.getresults(g_out.Phase_6, g_out.ResultTypes.Soil.Uy, 'node') #determine maximum heavefor x, y, uy inzip(soilX, soilY, soilUy): if x_left < x < x_right: ifabs(y - y_bottom) < 1E-5: if uy > maxUy: maxUy = uy xAtMaxUy = x yAtMaxUy = y print("Maximum heave of excavation bottom: uy={:.3f} m ""at (X,Y)=({:.2f},{:.2f})".format(maxUy, xAtMaxUy, yAtMaxUy))
The result from Python would look like this:
Response from Python in IDLE >>>Maximum heave of excavation bottom: uy=0.050 m at (X,Y)=(50.00,20.00)>>>
Output scripting example: get maximum bending moment
In this example, we will use Tutorial Lesson 3 (Tied back excavation) [link] for the Plaxis file. In this case, we want to determine the maximum bending moment for the left retaining wall for each phase in which the plate is active. This left retaining wall is activated in Phase_1, and is located at X = 40 m.
Image may be NSFW.
Clik here to view.
In order to retrieve the maximum and minimum bending moment for the left retaining wall, we will use Output’s Remote Scripting environment with the Python wrapper:
- we will need to launch the Output scripting server, available via the Expert menu
- and we should make sure the Plaxis results are opened in the Output program
- then we will obtain the bending moment values for each phase in which the plate is active. Since the plate is activated in Phase_1, we can use all phases, except the InitialPhase ( g_out.Phases[1:] )
- for each phase we will obtain all plate results: coordinates X and Y, and the bending moment M.
- from which we will filter out the nodes that are part of the left retaining wall (at X= 40.0). Because the order of the nodes is the same in each of the getresults-lists, we can use the X - coordinate to filter out the correct bending moment.
- and from this we will obtain the maximum value for the bending moment for the left retaining wall.
localhostport_output = 10001 plaxis_path =r'C:\Program Files (x86)\Plaxis\PLAXIS 2D'#no trailing backslash!import imp found_module = imp.find_module('plxscripting', [plaxis_path]) plxscripting = imp.load_module('plxscripting', *found_module) from plxscripting.easy import* s_out, g_out = new_server('localhost', localhostport_output) #geometric limits for the left retaining wall: x_left = 40.0 #for all phases, starting from the second phase (Phase_1)for phase in g_out.Phases[1:]: #initialize defaults: maxM = 0.0 xAtMaxM = 0.0 yAtMaxM = 0.0 minM = 0.0 xAtMinM = 0.0 yAtMinM = 0.0 #obtain result tables plateX = g_out.getresults(phase, g_out.ResultTypes.Plate.X, 'node') plateY = g_out.getresults(phase, g_out.ResultTypes.Plate.Y, 'node') plateM = g_out.getresults(phase, g_out.ResultTypes.Plate.M2D, 'node') #determine minimum and maximum bending moment:for x, y, M inzip(plateX, plateY, plateM): #is it on the left wall (with small numerical tolerance)?ifabs(x - x_left) < 1E-5: if M > maxM: maxM = M xAtMaxM = x yAtMaxM = y if M < minM: minM = M xAtMinM = x yAtMinM = y print( "{}: ".format( phase.Name ) +"Mmax = {:.2f} kNm/m at Y={:.2f} m; ".format(maxM, yAtMaxM) +"Mmin = {:.2f} kNm/m at Y={:.2f} m".format(minM, yAtMinM) )
The result from Python would look like this:
Response from Python in IDLE >>>Phase_1: Mmax = 3.02 kNm/m at Y=26.33 m; Mmin = -0.00 kNm/m at Y=30.00 m Phase_2: Mmax = 4.91 kNm/m at Y=20.00 m; Mmin = -40.26 kNm/m at Y=25.67 m Phase_3: Mmax = 21.12 kNm/m at Y=22.62 m; Mmin = -95.82 kNm/m at Y=27.00 m Phase_4: Mmax = 67.74 kNm/m at Y=23.67 m; Mmin = -91.31 kNm/m at Y=27.00 m Phase_5: Mmax = 26.12 kNm/m at Y=19.57 m; Mmin = -142.64 kNm/m at Y=23.00 m Phase_6: Mmax = 123.35 kNm/m at Y=20.00 m; Mmin = -140.43 kNm/m at Y=23.00 m>>>
Output scripting example: create curve data
Since PLAXIS 2D 2015 and PLAXIS 3D AE, the Output program can also be accessed via REST Http / Remote Scripting in order to retrieve calculation result data via a scripting interface.
Retrieving curve data is one of the possible options for the data retrieval. In this example, we will retrieve the results and store these in a text file.
First, we will need to make sure that the current open PLAXIS Output program is accessible as Remote Scripting server. This can be achieved by activating the Remote scripting server via the Expert menu in the Output program.
Next, we will need to tell the Python script where it can access this Remote scripting server.
This can be done with e.g. this script code:
import imp plaxis_path =r'C:\PLAXIS'#your PLAXIS installation path found_module = imp.find_module('plxscripting', [plaxis_path]) plxscripting = imp.load_module('plxscripting', *found_module) from plxscripting.easy import* outputport = 10001 s_output,g_output=new_server('localhost', outputport)
Now we can retrieve the data. For this we will use the command getcurveresults(). Since this command will only return one result value, the script will need to access each step id of the desired phases.
In the example below, the Python script stores a table in a file, and it will store the following columns, using the phase order as specified in the parameter phaseorder:
- phase name
- step number
- time
- u_y for Node A ( g_output.Nodes[0] )
- u_y for Node B ( g_output.Nodes[1] )
Note: You will need to store all steps during your calculation, otherwise it will not be possible to retrieve the time value for any of the unsaved steps.
defgettable_time_vs_uy(filename=None, phaseorder=None): #init data for lists stepids = [ ] uyAs = [] uyBs = [] times = [] phasenames= [] #look into all phases, all steps:for phase in phaseorder: for step in phase.Steps.value: phasenames.append( phase.Name.value ) stepids.append( int(step.Name.value.replace("Step_","")) ) uyAs.append( g_output.getcurveresults( g_output.Nodes[0], step, g_output.ResultTypes.Soil.Uy) ) uyBs.append( g_output.getcurveresults( g_output.Nodes[1], step, g_output.ResultTypes.Soil.Uy) ) #make sure step info on time is available, then add it:ifhasattr(g_output.Phases[-1].Steps.value[-1].Info, 'EstimatedEndTime'): times.append( step.Info.EstimatedEndTime.value ) else: times.append( None ) if filename: withopen(filename,"w") asfile: file.writelines( [ "{}\t{}\t{}\t{}\t{}\n".format( ph,nr,t,uyA,uyB ) for ph,nr,t,uyA,uyB inzip( phasenames, stepids, times, uyAs, uyBs ) ] )
Now we can make a call to this function in order to save a text file with this data for phases Phase_1 and Phase_2:
gettable_time_vs_uy( filename=r'c:\data\project_curvedata.txt', phaseorder = [ g_output.Phase_1, g_output.Phase_2 ] )
This data can then easily be used in spreadsheet programs to easily create charts or do other sorts of post processing.
Notes
- To retrieve ΣMstage, use step.Info.SumMStage.value
- To retrieve Force Fx, Fy or Fz (for 3D), use step.Info.ReachedForceX.value, step.Info.ReachedForceY.value or step.Info.ReachedForceZ.value respectively
- Time value parameters are currently named as following:
- In order to retrieve the end time for a phase or step, use phase.Info.EstimatedEndTime.value or step.Info.EstimatedEndTime.value respectively
- When retrieving the total Dynamic time (in seconds), use phase.Info.ReachedTime.value or step.Info.ReachedTime.value
To get this data per step, use step. To get the phase final value, use phase.
Output scripting example: get anchor force
In this example, we will use Tutorial Lesson 3 (Tied back excavation) [link] for the Plaxis file. In this case, we want to determine the force in the top anchor that is connected on the left retaining wall. This anchor is activated in Phase_3, and is connected with the wall at X = 40 m and Y = 27 m .
Image may be NSFW.
Clik here to view.
In order to retrieve this anchor force, we will use Output’s Remote Scripting environment with the Python wrapper:
- we will need to launch the Output scripting server, available via the Expert menu
- and we should make sure the Plaxis results are opened in the Output program
- then we will obtain the anchor force for each phase in which the anchor is active. Since the ground anchor is activated in Phase_3, we can use all phases starting from this phase ( g_out.Phases[3:] )
- for each phase we will obtain the anchor results: coordinates X and Y, and the anchor force N.
- from which we will filter out the node that belongs to the top anchor of the left retaining wall (at X= 40.0, Y = 27 m). We can identify an anchor by one of its endpoints. Because the order of the nodes is the same in each of these getresults-lists, we can use the X and Y coordinates to filter out the correct anchor force.
localhostport_output = 10001 plaxis_path =r'C:\Program Files (x86)\Plaxis\PLAXIS 2D'#no trailing backslash!import imp found_module = imp.find_module('plxscripting', [plaxis_path]) plxscripting = imp.load_module('plxscripting', *found_module) from plxscripting.easy import* s_out, g_out = new_server('localhost', localhostport_output) #geometric data for correct anchor: Xanchor = 40.0 Yanchor = 27.0 #start from Phase_3 since the anchors are not active before this phasefor phase in g_out.Phases[3:]: anchorF = g_out.getresults(phase, g_out.ResultTypes.NodeToNodeAnchor.AnchorForce2D, 'node') anchorX = g_out.getresults(phase, g_out.ResultTypes.NodeToNodeAnchor.X, 'node') anchorY = g_out.getresults(phase, g_out.ResultTypes.NodeToNodeAnchor.Y, 'node') for x,y,N inzip(anchorX,anchorY,anchorF): #check for the correct anchor by location:ifabs(x - Xanchor) < 1E-5 andabs(y - Yanchor) < 1E-5: print("Anchor force N in {}: {:.2f} kN/m".format(phase.Name,N))
The result from Python would look similar to this:
Response from Python in IDLE >>>Anchor force N in Phase_3: 500.00 kN/m Anchor force N in Phase_4: 544.09 kN/m Anchor force N in Phase_5: 468.03 kN/m Anchor force N in Phase_6: 460.27 kN/m>>>
Consolidation: Minimum Pore Pressures and Degree of Consolidation analysis may give spurious displacements of boundary nodes
When performing a consolidation analysis three possibilities exist:
- Staged Construction (SC);
- Minimum Pore Pressure(MPP);
- and Degree of Consolidation(DoC).
For a SC calculation a time interval must be specified for the duration of the consolidation process whereas for the other two options the duration of the consolidation process is in fact a result of the calculation by specifying the end of consolidation. This end of consolidation is specified either as the maximum allowed excess pore pressure anywhere in the model or the degree of consolidation that must be at least reached anywhere in the model.
However, this is not the only difference in the two calculation types. More important is that a SC calculation can deal with changes in the geometry (construction, excavation, changes of water level and/or loads) during the consolidation process. These changes lead to a so-called unbalance between the externally applied loads and the internal stresses in the model and this unbalance will be solved. On the other hand, the MPP and DoC analysis assume a fixed geometry: they are pure consolidation analyses that do not take into account the possibility of an unbalance.
This may have consequences when performing a consolidation analysis directly after an undrained analysis (Plastic or Dynamic). Such an undrained analysis will generate excess pore pressures even on the nodes on the contour of the model, for instance the soil surface. A consolidation analysis, however, would consider the soil surface an open boundary where the excess pore pressures are by definition zero. Hence, at the start of the consolidation analysis the excess pore pressures on the soil surface and any other boundary that is not explicitly set as a closed flow boundary are set to zero. By doing so, the total stresses at those boundary nodes are changed and so an unbalance is created. If the consolidation analysis is a SC calculation, this unbalance will be solved as part of the consolidation analysis whereas for a MPP and DoC analysis this unbalance will remain throughout the calculation. For the MPP and DoC analyses this may lead to spurious displacements of boundary nodes, especially if the soil is cohesionless and does not allow for tensile stresses.
It is therefore in general not recommended to use an MPP or DoC type of consolidation analysis directly after an undrained Plastic or Dynamic analysis but rather use a SC type of consolidation analysis first. This SC type of consolidation phase can then be followed by an MPP or DoC consolidation phase. The SC consolidation analysis will set the excess pore pressures on the boundaries to zero and solve the unbalance so that for the MPP or DoC analysis there will be no unbalance left to influence the results.