# Example 8: Beam under uniform and large axial load (P-Δ effect) using 3D Frame Analysis Library

## Example 8: Beam under uniform and large axial load (P-Δ effect) using 3D Frame Analysis Library

In this example, we will call the 3D Frame Library from a Visual Studio project and carry out the structural analysis of a simple beam under uniform load and large compressive force in order to get its P-Δ effect. We will first provide the geometry, material properties and loads and afterwards call the corresponding routine in order to obtain the results. Sample beam under large compressive load analyze with 3D Frame Library (Metric units)

We will first create a new C# Windows Application project from Visual Studio and follow the following steps to carry out the structural analysis according the data provided. Please notice that we could use any other .NET compatible language and take the corresponding steps. The source code of all examples can be downloaded here.

## Add a reference to 3D Frame Library

A reference to Frame 3D Library can easily be added by right clicking on the application project and selecting Add --> Reference.

## Providing the data to 3D Frame Library using C#

### New model definition

``````Model Model = new Model();

### Definition of materials

``````//Create a new material for concrete
Material matConcrete = new Material();
matConcrete.Name = "Concrete";//Material name
matConcrete.Density = 2.5;//density in mass units/m3, for example tn/m3
matConcrete.G = 11538461;//shear modulus
matConcrete.E = 30000000;//elasticity modulus``````

### Definition of cross section

``````//Create a new beam section of dimensions 50cmx50xm
FrameElementSection secBeam50_50 = new FrameElementSection();
secBeam50_50.Name = "Beam50/50";//section name
secBeam50_50.A = 0.5 * 0.5;//section area
secBeam50_50.Iy = 0.5 * 0.5 * 0.5 * 0.5 / 12;//inertia moment about local y axis
secBeam50_50.Iz = 0.5 * 0.5 * 0.5 * 0.5 / 12;//inertia moment about local z axis
secBeam50_50.It = 4.347e-3;//torsional constant
secBeam50_50.b = 0.5;//section height
secBeam50_50.h = 0.5;//section height``````

### Definition of model geometry and static loads

``````//First node creation
Frame3D.SuperNode n1 = new Frame3D.SuperNode(1, 0, 0, 0);
//Application of supports (fixed conditions out of plane)
n1.dof1constraint = true;
n1.dof2constraint = true;
n1.dof3constraint = true;
n1.dof4constraint = true;
n1.dof5constraint = false;
n1.dof6constraint = true;

//Second node creation
Frame3D.SuperNode n2 = new Frame3D.SuperNode(2, 5, 0, 0);
//Application of supports (fixed conditions out of plane)
n2.dof1constraint = false;
n2.dof2constraint = true;
n2.dof3constraint = true;
n2.dof4constraint = true;
n2.dof5constraint = false;
n2.dof6constraint = true;
L.Px = -1000;

//Frame element creation
FrameSuperElement el1 = new FrameSuperElement(1, n1, n2, new Geometry.XYZ(0, 1, 0), matConcrete, secBeam50_50, new MemberReleases(), new MemberReleases(), false, false);

### Definition of geometric non linear case

``````//Creation of a geometric non linear case that includes all load cases defined as "L"
GeometricNonLinearCase NLcase = new GeometricNonLinearCase("NL");
//Analysis parameters:
NLcase.ConvergenceTolerance = 1e-12;//convergence tolerance in terms of force
//It will include the loads that have been defined as "L"
//Definition of stiffness matrix update mode

### Call the solution method

``Model.Solve();``

### Obtain the analysis results

``````double[] Min, Max; Have any questions? Do not hesitate to contact us! Contact  us ›