Quantcast
Channel: PLAXIS - Knowledge Base - PLAXIS 2D
Viewing all 43 articles
Browse latest View live

Using PLAXIS Remote scripting with the Python wrapper

$
0
0
Application:

The PLAXIS software provides a HTTP based API (REST HTTP API), for which a special Python wrapper was developed to for an easy to use scripting API. Both PLAXIS Input and PLAXIS Output support this usage of a Remote Scripting server.

Prerequisites

In order to use this

  • a PLAXIS VIP licence is required
  • a recent version of Python. This can be downloaded from http://python.org/download/ . The Python installer comes with a code editor called IDLE. Many alternatives are available, however in Plaxis documentation we will assume IDLE as the editor of choice.
  • At least a very rudimentary knowledge of the Python language is recommended. The Plaxis documentation makes no attempt to teach it. Good resources for this purpose are e.g.:
  • The firewall should not block the PLAXIS application from accessing the internet, nor must it block other applications (in particular the python.exe executable) from communicating with the remote scripting server inside the PLAXIS application.

Activate scripting server

In order to start using this Remote Scripting/REST HTTP API, the remote scripting server inside PLAXIS needs to be activated. This can be done by opening the menu item Expert > Configure remote scripting server. The corresponding window will pop up, see Figure 1:

Figure 1. Configure remote scripting server window

In order for the Remote Scripting server to run, you would need:

  1. A valid PLAXIS VIP licence;
  2. A working HTTP connection to the Plaxis Remote scripting Authorization site (i.e. a working internet connection);
  3. The local connection port needs to be configured and the server activated.


Figure 2. Run the remote scripting server requirements:
1) valid licence, 2) connection with the Remote Plaxis service website
and 3) a local connection port

Boilerplate code

In order to start your first Python script, you must make sure that your Python script can communicate with the PLAXIS application. For this, the Plaxis scripting library wrapper needs to be imported as a module and the correct port needs to be set. For a locally running PLAXIS application this can easily be achieved using the following boilerplate Python code to start your Python script with (assuming the scripting server port was set to 10000, see above):

localhostport = 10000
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, g = new_server('localhost', localhostport)

In this, we need to set the correct localhost port using the same number as set in the Configure remote scripting server window. Next we need the location where the PLAXIS application is installed: plaxis_path. From this location we will import the plxscripting module to allow for the communication with the Plaxis application.

Now we have two new variables:

  • s: this is bound to an object representing the PLAXIS Application (the Remote scripting server).
  • g: this variable is bound to the global object of the current open Plaxis model. This should be used when you want to make changes to the model (e.g. adding a borehole or a point, generating the mesh and start the calculation).

PLAXIS Input and PLAXIS Output

Note, if you want to use both PLAXIS Input and PLAXIS Output in your Python script, you will need to setup the connection with Input and Output separately by binding the server and the global object for Input and Output separately using each their own port number:

#[...]
localhostport_input = 10000
localhostport_output = 10001
s_input, g_input = new_server('localhost', localhostport_input )
s_output, g_output = new_server('localhost', localhostport_output )

Trouble shooting

If your script gives an error, please check the following:

  • Is the PLAXIS application running?
  • Is the Remote Scripting server inside PLAXIS activated with the same port number as used in the Python script?
  • Is the firewall blocking communications with the PLAXIS application?

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 manual and the related links.

 


Receive instant notifications for finished calculations on your phone

$
0
0
Application:

When running long calculations using PLAXIS, it would be great if you can receive instant notifications when this calculation is finished: either via e-mail or a (push) notification on your smartphone (e.g. iPhone or Android device). This could be very useful for calculations that run unattended for example during a meeting, during lunch break or after office hours.
With the implementation of the PLAXIS Remote Scripting / Http REST API, this is now possible: once a calculation is finished you can be notified instantly!

First step: Message composition

Any method that we will use below will first need to calculate the PLAXIS project and gather the results for a short overview of the calculation result.

First we need to have the model loaded into PLAXIS and PLAXIS needs to be run as a Remote Scripting server. The PLAXIS Remote Scripting server within PLAXIS 2D or PLAXIS 3D can be activated via the menu item Expert > Remote Scripting server. See also the related page on Using PLAXIS Remote scripting with the Python wrapper, see the link at the bottom of the page.

Next step is to use the Python wrapper/scripting to start the calculation, after which we can collect the results:

  • check for each phase if the calculation was successful or not
  • Optional, when desired we can get main characteristics for a calculation type, like the reached SumMsf value for a Safety calculation (i.e. the Factor of Safety)
  • And determine a summary for the notification

Here we can write a function that gathers the basic phase information: was it calculated, and was it calculated successful or did it fail:

defgather_phase_overview():
    results = []
    allpassed =Truefor phase in g.Phases[:]:
        msg ="not calculated"ifnot phase.ShouldCalculate:
            if phase.CalculationResult == phase.CalculationResult.ok:
                msg ="OK"#may be extended for more detailselse:
                msg ="Failed: error {0}".format(phase.LogInfo)
                allpassed =False
        results.append( "{0}: {1}".format( phase.Name, msg) )

    return allpassed, results

This can be used to create message data with a subject/summary and a detailed message (the body):

defget_message_info():
    message = { "Subject": "",
                "Body": ""}
    allpassed, results = gather_phase_overview()
    if allpassed ==True:
        message["Subject"] ="Calculation OK"else:
        message["Subject"] ="Calculation failed"
    body = [ "Summary for PLAXIS calculation" ]
    body.append( "Title: {0}".format(g.Project.Title)  )
    body.append( "File: {0}".format(g.Project.Filename) )
    body.append('')
    body.append('Phase results:')
    for result in results:
        body.append('- {0}'.format(result) )
    message["Body"] ="\n".join(body)
    return message

E-mail notification

With Python it is possible to send e-mail messages, e.g. by using the SMTP protocol via the smtplib module, but of course more methods are available. For a detailed example, please refer to:

Push notifications on smart devices

Using third party services/apps it is possible to get push messages/notifications on smart devices like iPhones or Android devices. Two of such services are for example:

Such services have apps available for e.g. iOS and Android. Using the service's API it is possible to send a self made notification to these apps on your smart phone.

Example: Notifications for iPhone using BoxCar

Below we have a sample code to send a message using BoxCar. Documentation on how to send a notification to BoxCar:

Note: to be able to use the Boxcar end-user API, you need your "Access Token". The access token is available from the general "Settings" screen of Boxcar or from the Boxcar Web Inbox setting page.
Also, we will use the requests module, which is not a standard Python module: it is available via https://pypi.python.org/pypi/requests (requires install) and it is also available as part of the Plaxis scripting environment.

import requests #available at https://pypi.python.org/pypi/requestsimport json
import time

classBoxCar:
    BASE_URL ="https://new.boxcar.io/api/"
    RETRY_ATTEMPTS = 3
    RETRY_SLEEP = 2
    SOUND ='done'
    ICON ='http://www.plaxis.nl/files/images/img_cms/img_000240_cms.jpg'def__init__(self, access_token):
        self.access_token = access_token
        self.success =False
        self.encoded_data =None
        self.sound=self.SOUND

    defnotify(self, title, message):
        attempts = 0
        while attempts < self.RETRY_ATTEMPTS:
            attempts += 1
            result = self._send_notification(title, message)
            if result.status_code == 201:
                print( "* Message: %s"% title )
                print( "* Message delivered @ %s"% result.headers['date'] )
                self.success =Truebreakelse:
                if attempts == self.RETRY_ATTEMPTS:
                    print( "! Message delivery FAILED: %s"% ( result ) )
                    print( "!   %s"% result.status_code )
                self.success =Falsereturn self.success
 
    def_send_notification(self, title, long_message ):
        '''
        Documentation on how to send a notification to BoxCar:
        https://boxcar.uservoice.com/knowledgebase/articles/306788
        '''print('Sending a notification via BoxCar...')
        long_message = long_message.replace( "\n", '<br />' )
        data = { 'user_credentials': self.access_token,
                 'notification': {
                     'title': "PLAXIS: {0}".format(title),
                     'long_message': long_message,
                     'sound': self.sound,
                     'icon_url': self.ICON,
                     'source_name' : 'PLAXIS'
                     } 
               }
        notifications_url = self.BASE_URL +"notifications"
        headers = {'Content-type': 'application/json',
                                   'Accept': 'application/json'}
        self.encoded_data = json.dumps(data, ensure_ascii=False).encode('utf8')
        _request = requests.post(notifications_url,
                                 data=self.encoded_data,
                                 headers=headers  )
        return _request

Now we can combine it to send a message. For this you will need your BoxCar token. The access token is available from the general "Settings" screen of Boxcar or from  Boxcar Web Inbox setting page.

g.calculate()

defsendmessage():
    message = get_message_info()
    boxcartoken =''# YOUR BOXCAR TOKEN HERE!
    push = BoxCar(boxcartoken)
    push.notify(message[ "Subject" ], message[ "Body" ])

sendmessage()

Now the push message on e.g. an iPhone will look like this:

Figure 1. Notifications using BoxCar 2: left lock screen push message and on the right the detailed message

Conclusion

Using the power of Plaxis Remote Scripting it is possible to get instant notifications about your PLAXIS calculations on your mobile devices!

Output scripting example: get heave of excavation bottom

$
0
0
Application:

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.

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.Soil.X, 'node')
soilY = g_out.getresults(g_out.Phase_6, g_out.Soil.Y, 'node')
soilUy = g_out.getresults(g_out.Phase_6, g_out.Soil.Uy, 'node')

#determine maximum heavefor x, y, uy inzip(soilX, soilY, soilUy):
    if x_left < x < x_right:
        if y == y_bottom:
            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

$
0
0
Application:

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.

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:

  1. we will need to launch the Output scripting server, available via the Expert menu
  2. and we should make sure the Plaxis results are opened in the Output program
  3. 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:] )
  4. for each phase we will obtain all plate results: coordinates X and Y, and the bending moment M.
  5. 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.
  6. 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.Plate.X, 'node')
    plateY = g_out.getresults(phase, g_out.Plate.Y, 'node')
    plateM = g_out.getresults(phase, g_out.Plate.M2D, 'node')

    #determine minimum and maximum bending moment:for x, y, M inzip(plateX, plateY, plateM):
        if x == x_left:
            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

$
0
0
Application:

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.Soil.Uy)
                         )
            uyBs.append( g_output.getcurveresults( g_output.Nodes[1],
                                                   step,
                                                   g_output.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(fname,"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.

Ground response analysis

$
0
0
Published on:
June, 2015
Application:

Earthquakes propagate from the bedrock to the surface through the overlying soil deposit,which acts as a filter and modify the ground motion characteristics. The variation of the seismic waves in terms of amplitude, duration and frequency content at any depth can be evaluated through a ground response analysis. The local soil stratigraphy, the material properties, the site topography, the ground water table depth and the characteristics of the earthquake (for example, duration, peak acceleration, frequency content) have a high influence on the ground response and on the modelling strategy. The ground response analysis of a soil deposit can be considered as a necessary preliminary study for the dynamic analysis of a structure, since its seismic response is influenced by the geological and geotechnical properties of the supporting soil. Due to its filter effect, the soil deposit modifies the seismic waves by amplifying the signal at some specific frequencies and damping it at some others. If the frequency at which the maximum amplification of the ground motion occurs is close to the natural frequency of the overlying structure, the building and the ground motion are in resonance with one another. This means that the system oscillates with very high amplitudes that can cause great damages in the building.

This example (with elaborated background information) concerns the one-dimensional wave propagation analysis through a clay deposit 40 m thick above the bedrock. One-dimensional analysis can be performed when the soil layers and the bedrock surface are horizontal and they extend to infinity, and the seismic waves coincide with shear waves propagating vertically from the underlying bedrock. This last assumption can be justified considering that the seismic waves, propagating from the earthquake source through the soil, are bent by successive refractions into a nearly vertical path (according to Snell's law of refraction). The problem can be modelled through a soil column with specific features, as described in the attached document.

This example presents the results of a one dimensional site response analysis performed with PLAXIS 2D, aimed at modelling the non-linear dissipative behaviour of soils subjected to an earthquake loading. In this respect, an important role is played by the choice of the constitutive model for the soil. The results of the fully dynamic analysis performed with PLAXIS 2D are compared to an equivalent-linear site response analysis performed with EERA, where the secant shear modulus and the damping ratio are updated in subsequent iterations to be consistent with the level of strain induced in each layer. In PLAXIS , the Hardening Soil model with small strain stiffness has been chosen showing that, for earthquakes characterized by moderate peak accelerations, it is capable to capture the soil behaviour during earthquake shaking. The results from both approaches are compared showing a good agreement.

Relative displacement response spectrum at 3.6 m from the surface level.
Comparison PLAXIS - EERA

Downloads

PLAXIS_Ground_response_analysis.pdfGround response analysis in PLAXISpdf| 2.06 MB
loma0.1g.txtAccelerogram for the ground response analysis example (to store: right click > Save as...)other| 36.94 KB

Macros using the commands runner

$
0
0
Application:

When using certain command templates multiple times, it would be helpful if you can re-play these commands with just a single click. With a Macro you can do this: you can easily play a set of predefined commands.

Creating a macro

To create a macro:

  • Go to the Macro library menu item (available under the Expert menu)
  • Here choose to manage the library
  • And add a new Macro
  • Give it a descriptive title
  • And add the commands you would like to perform when executing this macro

Figure 1. The Macros library window

Using a macro

In order to make use of a macro, open the menu item Expert > Macro library > and here you will see the available macros. Now click on a macro to execute it.

Figure 2. Macros in the Expert menu

Keyboard shortcuts

Next to using the menu item to run a macro, PLAXIS also offers to execute a command via a keyboard shortcut. The first macro will be accessible via the key combination Shift + Ctrl + Alt + 1. This keyboard shortcut is also shown in the menu Expert > Macro library, see in the image above.

Examples

Tip: to make any command more flexible and useful in any Plaxis model, use the Group Filtered and Apply commands [link] in combination with the possibility to refer to any object using their index [link]. See also the examples below.

Calculation settings

Let’s say you have a large project with many phases and want to switch all of them except the initial one to use

  • a max. of 2 CPUs (cores)
  • and you want to store 10 steps for each phase.

You can write this macro for it:

groupfiltered Phases "PreviousPhase!="# all except the initial phaseapply Groups[-1]"setproperties""MaxCores"2apply Groups[-1]"setproperties""MaxStepsStored"10ungroup Groups[-1]# get rid of temporary group to leave model clean

This will work regardless of how many phases and/or groups you already have. It will only fail if you just have the initial phase, as that would try to create an empty group at the beginning.

Or, if you want to only change this for all the phases that are set to be calculated, we can add a new filter (groupfiltered command) to only use phases that are set to be calculated (ShouldCalculate == True), and then directly calculate it:

gotostagesgroupfiltered Phases"ShouldCalculate=True"groupfilteredGroups[-1]"PreviousPhase<>"applyGroups[-1]"sps""MaxCores"2#insert here the number of CPUsapplyGroups[-1]"sps""MaxStepsStored"10#max steps to save per phaseungroupGroups[-1]ungroupGroups[-1]calculate

Switch to Updated Mesh

To change all phases to use Updated Mesh, you can use this macro:

gotostagesgroupfiltered Phases"ShouldCalculate=True"groupfilteredGroups[-1]"PreviousPhase<>"applyGroups[-1]"sps""Deform.UseUpdatedMesh"TrueapplyGroups[-1]"sps""Deform.UseUpdatedWaterPressures"True#2D ONLYungroupGroups[-1]ungroupGroups[-1]

Note that UpdatedWaterPressures is currently (2015) only available in PLAXIS 2D.

Geometry checks for meshing in PLAXIS 3D

The tabulate command can also be used to detect if small surfaces or volumes are present in the intersected 3D geometry in the mesh mode. This could indicate problem areas for the 3D mesh generation.
To check for small volumes ( < 1 m3), small surfaces (e.g. a surface area < 0.1 m2) and small lines, you can use this macro:

tabulate SoilVolumes"Volume""Volume<1"tabulate Volumes"Volume""Volume<1"tabulate Surfaces"Area""Area<0.1"tabulate Lines"Length""Length<0.1"

Show a table of safety factors

To show a table of the SumMsf values, you can use this single command as a macro to quickly get this table in the Input program:

tabulatephases"PreviousPhaseReached.ReachedMsf""DeformCalcType=Safety"

Evaluation of the up and down movements of the Vlaketunnel with cyclic analysis using PLAXIS 2D

$
0
0
Published on:
April, 2015
Application:

As part of the InfraQuest research into the sustainability of immersed tunnels in the Netherlands, a study was carried out at Delft University of Technology to analyze the up and down movements of the Vlaketunnel. InfraQuest is a joint research program of the Ministry of Infrastructure, Delft University of Technology and Delft TNO. The research was done by N. Benhaddou as a final MSc. project.


Multi-stage excavation of a tunnel with rockbolts

PLAXIS Connect

$
0
0
Application:

PLAXIS Connect can be used for updating your CodeMeter licence, to validate your installed software, and keep it up to date. Furthermore it will warn you when updates are available, and show you the latest news about our products and services. Watch the instructional movie, and find out how simple it is.

PLAXIS Connect is automatically installed with the PLAXIS 2D and PLAXIS 3D software.

Downloads

PlaxisConnectSetup.exePLAXIS Connect Version 9.0exe| 3.15 MB

Re-use materials from other projects

$
0
0
Application:

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:

  1. Start a new project in Plaxis (or load an existing project);
  2. Open the material sets window and expand the global materials (the current location of the global material database can be seen below);
  3. Click on Select… to change the current global material database;
  4. Browse to the location of the global material database that is intended to be used;
  5. Select the global material file (*.matdb), e.g. Sands_only.matdb and click on Open.

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:

  1. Start a new project in Plaxis;
  2. Open the material sets window and expand the global materials;
  3. Click on Select… to open the window of global material database location;
  4. Browse to the location in which the new global material database will be placed (this can also be a network location);
  5. Create a new folder and name it accordingly, e.g. Global;
  6. Specify a filename, e.g. sands_only.matdb;
  7. 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:

  1. Open a project, which includes the material data set(s);
  2. Make sure that you have selected the new global material database (checks step of the previous procedure);
  3. 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;
  4. 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:


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.

How to check undrained shear strength using Undrained A?

$
0
0
Application:

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.

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 Cross section
  • or by using the Hint box  and move your mouse over the area of interest.

 

Site response analysis and liquefaction evaluation

$
0
0
Published on:
October, 2015

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.

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

PLAXIS_Site_response_analysis_liquefaction_evaluation.pdfSite response and liquefaction evaluation in PLAXISpdf| 1.9 MB
amax=3_amax=0.3g.txtAccelerogram for the liquefaction example (to store: right click > Save as...)other| 39.37 KB

Python commands reference

$
0
0
Application:

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 commandborehole5
Python equivalent
g.borehole( 5 )

Add a point in PLAXIS 2D

Plaxis commandpoint12
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 commandsetPoint_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:

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.

Consolidation: Minimum Pore Pressures and Degree of Consolidation analysis may give spurious displacements of boundary nodes

$
0
0
Application:

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.


PLAXIS 2D and 3D applications in geotechnical earthquake engineering

$
0
0
Author:
Published on:
November, 2015
Application:

In current design practice, geotechnical earthquake engineers are often responsible for providing the appropriate design ground motions for structural analysis, studying the effects of earthquakes and elaborating methods to mitigate these effects. A site response analysis is required to investigate the complex interaction between the seismic waves and the local site conditions. Morphology, stratigraphy, water conditions and soil properties have a high influence not only on the characteristics of the earthquake (for example in terms of duration, peak acceleration and frequency content) but also on the modelling strategy.

2D FEM analysis compared with the in-situ deformation measurements

$
0
0
Published on:
November, 2015
Application:

Small-strain stiffness is seen as a fundamental property that almost all soils ranging from colloids to gravels, and even rocks exhibit. This is the case for static and dynamic loading, and for drained and undrained conditions. In literature, small-strain stiffness is assumed to exist due to inter-particle forces within the soil skeleton. Therefore, it can be altered only if these inter-particle forces are rearranged (Benz et al., 2009).
The deformation behaviour as a result of the excavation of a building pit in the inner city of Amsterdam is studied using the small strain stiffness model in PLAXIS 2D. The numerical results of deformations on the sheet pile wall during the different excavation stages obtained using PLAXIS are compared with the measured data. The objective of this study is to investigate the differences in computed deformation of the sheet pile wall when using the Hardening Soil Model (HS) and the Hardening Soil Small Strain Stiffness model (HSsmall) employing the correlations of Alpan (1970) and Benz & Vermeer (2007) compared with the inclinometer data to assess their performance in an actual design process.

Macros using the commands runner

$
0
0
Application:

When using certain command templates multiple times, it would be helpful if you can re-play these commands with just a single click. With a Macro you can do this: you can easily play a set of predefined commands.

Creating a macro

To create a macro:

  • Go to the Macro library menu item (available under the Expert menu)
  • Here choose to manage the library
  • And add a new Macro
  • Give it a descriptive title
  • And add the commands you would like to perform when executing this macro

Figure 1. The Macros library window

Using a macro

In order to make use of a macro, open the menu item Expert > Macro library > and here you will see the available macros. Now click on a macro to execute it.

Figure 2. Macros in the Expert menu

Keyboard shortcuts

Next to using the menu item to run a macro, PLAXIS also offers to execute a command via a keyboard shortcut. The first macro will be accessible via the key combination Shift + Ctrl + Alt + 1. This keyboard shortcut is also shown in the menu Expert > Macro library, see in the image above.

Examples

Tip: to make any command more flexible and useful in any Plaxis model, use the Group Filtered and Apply commands [link] in combination with the possibility to refer to any object using their index [link]. See also the examples below.

Calculation settings

Let’s say you have a large project with many phases and want to switch all of them except the initial one to use

  • a max. of 2 CPUs (cores)
  • and you want to store 10 steps for each phase.

You can write this macro for it:

groupfiltered Phases "PreviousPhase!="# all except the initial phaseapply Groups[-1]"setproperties""MaxCores"2apply Groups[-1]"setproperties""MaxStepsStored"10ungroup Groups[-1]# get rid of temporary group to leave model clean

This will work regardless of how many phases and/or groups you already have. It will only fail if you just have the initial phase, as that would try to create an empty group at the beginning.

Or, if you want to only change this for all the phases that are set to be calculated, we can add a new filter (groupfiltered command) to only use phases that are set to be calculated (ShouldCalculate == True), and then directly calculate it:

gotostagesgroupfiltered Phases"ShouldCalculate=True"groupfilteredGroups[-1]"PreviousPhase<>"applyGroups[-1]"sps""MaxCores"2#insert here the number of CPUsapplyGroups[-1]"sps""MaxStepsStored"10#max steps to save per phaseungroupGroups[-1]ungroupGroups[-1]calculate

Switch to Updated Mesh

To change all phases to use Updated Mesh, you can use this macro:

gotostagesgroupfiltered Phases"ShouldCalculate=True"groupfilteredGroups[-1]"PreviousPhase<>"applyGroups[-1]"sps""Deform.UseUpdatedMesh"TrueapplyGroups[-1]"sps""Deform.UseUpdatedWaterPressures"True#2D ONLYungroupGroups[-1]ungroupGroups[-1]

Note that UpdatedWaterPressures is currently (2015) only available in PLAXIS 2D.

Geometry checks for meshing in PLAXIS 3D

The tabulate command can also be used to detect if small surfaces or volumes are present in the intersected 3D geometry in the mesh mode. This could indicate problem areas for the 3D mesh generation.
To check for small volumes ( < 1 m3), small surfaces (e.g. a surface area < 0.1 m2) and small lines, you can use this macro:

tabulate SoilVolumes"Volume""Volume<1"tabulate Volumes"Volume""Volume<1"tabulate Surfaces"Area""Area<0.1"tabulate Lines"Length""Length<0.1"

Show a table of safety factors

To show a table of the SumMsf values, you can use this single command as a macro to quickly get this table in the Input program:

tabulatephases"PreviousPhaseReached.ReachedMsf""DeformCalcType=Safety"

How to use a user defined soil model in PLAXIS

$
0
0

How to create a model for ground response analysis in PLAXIS 2D

Viewing all 43 articles
Browse latest View live