Drafting in Octave/Matlab

Plotting package of octave is very powerful. It can be used to plot architectural drawings. Following steps are required:

  1. Sketching the layout on paper while noting down the points and labeling it.
  2. Afterwards, the coordinates of point is calculated.
  3. Commands of line, gtext and axis limits are used.

For demo, m-file named drawoschool.m (draw octave school) is created which can be downloaded from here

To use this m-file, type:

 >>drawoschool
Architectural Drafting in GNU OCTAVE

Architectural Drafting in GNU OCTAVE

CCX on Android Devices

Today smart phones have revolutionized Engineering Computations. Computer Aided Engineering (CAE) is now more easy and accessible with help of android tablets and phones.

CalculiX CrunchiX Solver – ccx is one of the most powerful Multiphysics GNU Finite Element Solver. This post is about how to compile and run gnu ccx on android. The code tested on HTC Incredible S and Android version 2.3.3.

If you are familiar with ccx or you can execute abaqus inp files using ccx, then, this script is helpful to you. Following steps show how to compile and run ccx on android.

1. Install Prerequisite Apps in Android:

a. Required android apps:

  1. GNURoot Wheezy by Corbin Champion
  2. GNURoot by Corbin Champion
  3. Free disk space on sdcard (better to have more than 6GB) and internal memory (better to have more than 500MB).

b. Required packages on Rootfs of GNURoot (Wheezy arm os):

  1. make
  2. gfortran
  3. gcc
  4. wget
  5. sed
  6. bzip2

2. Compiling ccx:

  1. Open GNUROOT
  2. Launch rootfs as fake root
  3. Download the script by following command:
    $wget http://enggprog.com/Downloads/Projects/calculix/cxbuild4mob

    Or you can use tar files of cxbuild4mob. Untar and use it. Do not forget to go through readme file inside tar folder. Link of tar file is:

    http://enggprog.com/Downloads/Projects/calculix/cxbuild4mob.tar.gz
  4. Make script executable and then run it. Estimate downloading and compilation time for ccx is about 3 hours.
    $chmod +x cxbuild4mob
    $./cxbuild4mob

3. How to use ccx on Android:

  1. Open GNURoot

    GNURoot

    Fig. 1: GNURoot

  2. Check Launch as Fake Root option then press Launch Rootfs button.

    Rootfs

    Fig 2: Rootfs with Fake Root option checked

  3. Change current directory to folder where inp file exists. Verify by ls command and then run it under ccx.

    inp file

    Fig 3: Verify inp file.

  4. Check for errors in ccx log.

    Output log

    Fig. 4: Output Log of ccx.

  5. Verify output files.
    Ouput files of ccx

    Fig. 5: Output files of ccx

     

4. References:

  1. CalculiX CrunchiX
  2. GNURoot

Highlighting Syntax in gedit for CalculiX CrunchiX inp file for Enhanced Readability

CalculiX is a free software nonlinear three-dimensional finite element program for structural applications. Following steps results in syntax highlight of inp file in gedit:

  1. Add .xml in ~/.local/share/mime/packages named ccx.xml with following content:
     <mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
      <mime-type type="text/x-inp">
        <comment>CalculiX CrunchiX inp files</comment>
        <glob pattern="*.inp"/>
      </mime-type>
    </mime-info>
  2. Update mime-database as:
           $ cd ./local/share
           $ update-mime-database mime     
  3. Add ccx.lang file in /usr/share/gtksourceview-3.0/language-specs or in path resulting from following command:
            $ locate gtksourceview | grep /c.lang
    

    The content of ccx.lang is:

    < ?xml version="1.0" encoding="UTF-8"?>
    <language id="ccx" _name="CalculiX" version="2.0" _section="Sources">
      <metadata>
        <property name="mimetypes">text/x-inp</property>
        <property name="globs">*.inp</property>
      </metadata>
      <styles>
        <style id="comment"           _name="Comment"               map-to="def:comment"></style>
        <style id="keyword"           _name="Keyword"               map-to="def:keyword"></style>
        <style id="card"              _name="Input Cards"           map-to="def:type"></style>
        <style id="element"           _name="Element Library"       map-to="def:constant"></style>
        <style id="floating-point"    _name="Floating point number" map-to="def:floating-point"></style>
        <style id="decimal"           _name="Decimal number"        map-to="def:decimal"></style>
      </styles>
      <definitions>
        <context id="comment" style-ref="comment">
        <start>\*\*</start>
        <end>$</end>
        </context>
        <!-- http://www.lysator.liu.se/c/ANSI-C-grammar-l.html -->
        <context id="float" style-ref="floating-point">
          <match extended="true">
            (?&lt;![\w\.])
            ((\.[0-9]+ | [0-9]+\.[0-9]*) ([Ee][+-]?[0-9]*)? |
             ([0-9]+[Ee][+-]?[0-9]*))
            [fFlL]?
            (?![\w\.])
          </match>
        </context>
        <context id="decimal" style-ref="decimal">
          <match extended="true">
            (?&lt;![\w\.])
            [0-9]+[uUlL]*
            (?![\w\.])
          </match>
        </context>
        <context id="keywords" style-ref="keyword">
          <keyword>2D</keyword>
          <keyword>3D</keyword>
          <keyword>CIRC</keyword>
          <keyword>ELSET</keyword>
          <keyword>MATERIAL</keyword>
          <keyword>NAME</keyword>
          <keyword>NSET</keyword>
          <keyword>OUTPUT</keyword>
          <keyword>RECT</keyword> 
          <keyword>SECTION FORCES</keyword>
          <keyword>SECTION</keyword>
          <keyword>S</keyword>
          <keyword>TYPE</keyword>
          <keyword>U</keyword>
        </context>
        <context id="elements" style-ref="element">
          <keyword>C3D8</keyword>
          <keyword>F3D8</keyword>
          <keyword>C3D8R</keyword>
          <keyword>F3D8R</keyword>
          <keyword>C3D8I</keyword>
          <keyword>C3D20</keyword>
          <keyword>F3D20</keyword>
          <keyword>C3D20R</keyword>
          <keyword>F3D20R</keyword>
          <keyword>C3D20RI</keyword>
          <keyword>C3D4</keyword>
          <keyword>F3D4</keyword>
          <keyword>C3D10</keyword>
          <keyword>F3D10</keyword>
          <keyword>C3D6</keyword>
          <keyword>F3D6</keyword>
          <keyword>C3D15</keyword>
          <keyword>F3D15</keyword>
          <keyword>S3</keyword>
          <keyword>S4R</keyword>
          <keyword>S6</keyword>
          <keyword>S8</keyword>
          <keyword>S8R</keyword>
          <keyword>CPS3</keyword>
          <keyword>CPS4</keyword>
          <keyword>CPS4R</keyword>
          <keyword>CPS6</keyword>
          <keyword>CPS8</keyword>
          <keyword>CPS8R</keyword>
          <keyword>CPE3</keyword>
          <keyword>CPE4</keyword>
          <keyword>CPE4R</keyword>
          <keyword>CPE6</keyword>
          <keyword>CPE8</keyword>
          <keyword>CPE8R</keyword>
          <keyword>CAX3</keyword>
          <keyword>CAX4</keyword>
          <keyword>CAX4R</keyword>
          <keyword>CAX6</keyword>
          <keyword>CAX8</keyword>
          <keyword>CAX8R</keyword>
          <keyword>B31</keyword>
          <keyword>B31R</keyword>
          <keyword>B32</keyword>
          <keyword>B32R</keyword>
          <keyword>D</keyword>
          <keyword>GAPUNI</keyword>
          <keyword>DASHPOTA</keyword>
          <keyword>SPRINGA</keyword>
          <keyword>DCOUP3D</keyword>
        </context>
        <context id="cards" style-ref="card">
          <prefix>\*</prefix> 
          <keyword>AMPLITUDE</keyword>
          <keyword>BEAM SECTION</keyword>
          <keyword>BOUNDARY</keyword>
          <keyword>BUCKLE</keyword>
          <keyword>CFLUX</keyword>
          <keyword>CHANGE FRICTION</keyword>
          <keyword>CHANGE MATERIAL</keyword>
          <keyword>CHANGE PLASTIC</keyword>
          <keyword>CLOAD</keyword>
          <keyword>COMPLEX FREQUENCY</keyword>
          <keyword>CONDUCTIVITY</keyword>
          <keyword>CONTACT FILE</keyword>
          <keyword>CONTACT OUTPUT</keyword>
          <keyword>CONTACT PAIR</keyword>
          <keyword>CONTACT PRINT</keyword>
          <keyword>CONTROLS</keyword>
          <keyword>COUPLED TEMPERATURE-DISPLACEMENT</keyword>
          <keyword>CREEP</keyword>
          <keyword>CYCLIC HARDENING</keyword>
          <keyword>CYCLIC SYMMETRY MODEL</keyword>
          <keyword>DASHPOT</keyword>
          <keyword>DEFORMATION PLASTICITY</keyword>
          <keyword>DENSITY</keyword>
          <keyword>DEPVAR</keyword>
          <keyword>DFLUX</keyword>
          <keyword>DISTRIBUTING COUPLING</keyword>
          <keyword>DLOAD</keyword>
          <keyword>DSLOAD</keyword>
          <keyword>DYNAMIC</keyword>
          <keyword>ELASTIC</keyword>
          <keyword>ELEMENT</keyword>
          <keyword>ELEMENT OUTPUT</keyword>
          <keyword>EL FILE</keyword>
          <keyword>EL PRINT</keyword>
          <keyword>ELSET</keyword>
          <keyword>END STEP</keyword>
          <keyword>EQUATION</keyword>
          <keyword>EXPANSION</keyword>
          <keyword>FACE PRINT</keyword>
          <keyword>FILM</keyword>
          <keyword>FLUID CONSTANTS</keyword>
          <keyword>FLUID SECTION</keyword>
          <keyword>FREQUENCY</keyword>
          <keyword>GAP</keyword>
          <keyword>GAP CONDUCTANCE</keyword>
          <keyword>HEADING</keyword>
          <keyword>HEAT TRANSFER</keyword>
          <keyword>HYPERELASTIC</keyword>
          <keyword>HYPERFOAM</keyword>
          <keyword>INCLUDE</keyword>
          <keyword>INITIAL CONDITIONS</keyword>
          <keyword>MATERIAL</keyword>
          <keyword>MODAL DAMPING</keyword>
          <keyword>MODAL DYNAMIC</keyword>
          <keyword>MODAL CHANGE</keyword>
          <keyword>MPC</keyword>
          <keyword>NO ANALYSIS</keyword>
          <keyword>NODAL THICKNESS</keyword>
          <keyword>NODE FILE</keyword>
          <keyword>NODE OUTPUT</keyword>
          <keyword>NODE PRINT</keyword>
          <keyword>NODE</keyword>
          <keyword>NORMAL PRINT</keyword>
          <keyword>NORMAL</keyword>
          <keyword>NSET</keyword>
          <keyword>ORIENTATION</keyword>
          <keyword>PHYSICAL CONSTANTS</keyword>
          <keyword>PLASTIC</keyword>
          <keyword>PRE-TENSION SECTION</keyword>
          <keyword>RADIATE</keyword>
          <keyword>RESTART</keyword>
          <keyword>RIGID BODY</keyword>
          <keyword>SELECT SECTION</keyword>
          <keyword>SOLID SECTION</keyword>
          <keyword>SPECIFIC GAS CONSTANT</keyword>
          <keyword>SPECIFIC HEAT</keyword>
          <keyword>SPRING</keyword>
          <keyword>STATIC</keyword>
          <keyword>STEADY STATE DYNAMICS</keyword>
          <keyword>STEP</keyword>
          <keyword>SUBMODEL</keyword>
          <keyword>SURFACE</keyword>
          <keyword>SURFACE BEHAVIOR</keyword>
          <keyword>SURFACE INTERACTION</keyword>
          <keyword>TEMPERATURE</keyword>
          <keyword>TIE</keyword>
          <keyword>TIME POINTS</keyword>
          <keyword>TRANSFORM</keyword>
          <keyword>UNCOUPLED TEMPERATURE-DISPLACEMENT</keyword>
          <keyword>USER MATERIAL</keyword>
          <keyword>VALUES AT INFINITY</keyword>
          <keyword>VIEWFACTOR</keyword>
          <keyword>VISCO</keyword>
        </context>  
        <!--Main context-->
        <context id="ccx">
          <include>
            <context ref="gtk-doc:inline-docs-section"></context>
            <context ref="comment"></context>
            <context ref="float"></context>
            <context ref="decimal"></context>
            <context ref="keywords"></context>
            <context ref="cards"></context>
            <context ref="elements"></context>
          </include>
        </context>
      </definitions>
    </language>
  4. Open inp file and select gedit program to open.
  5. If you dont like or face problem then revert back the inp files to plain text as:
        $ gvfs-set-attribute [path_to_your_inp_file]  metadata::gedit-language ''
    

Syntax Highlight Files can be downloaded from below link:
Download Syntax Highlight Files.

before syntax highlight

Fig.1: Before Syntax Highlight of CCX input file.

after syntax highlight

Fig.2: After Syntax Highlight of CCX input file.

 

Reference:

  1. Gedit New Language File
  2. Language Definition v2.0 Tutorial
  3. SuperUser.com
  4. CalculiX CrunchiX

Hosting Video on Your Website and Blog

Nowadays web trend is for free decentralized web services. Instead of centralized video tubes, social network and cloud, web developers and users prefer decentralized and free(dom) web services. This post overviews free video hosting alternatives for web developers and bloggers. It is about encouragement to your own video service right on your website or blog and embedding the video links from websites other the youtube.

There are 04 solutions and you can choose the one which suits you:

  1. HTML5 video tag.
  2. VideoPress plugin for WordPress site.
  3. Mediagoblin.
  4. Embedding links from websites other than youtube.

1. HTML5 Video Tag:

If you have a little know how of how html works then you can easily tag video in following steps.

  1. Create/Select your video and convert it in ogg format from Online Video Converter website or from firefogg.org.
  2. Upload the video in .ogg extension to desired web folder of your website.
  3. Use it in video tag.
    <video width="320" height="240" src="..//bin/edit/myvideofiles/video.ogv"></video> 

    and save your Web page.

  4. For fallback mode, in case of no support for html5 in user’s browser, upload cartado applet to root folder of your website and use following applet tag with your video tag:
    <applet archive="http://www.theora.org/cortado.jar" code="com.fluendo.player.Cortado.class" width="352" height="288">
    <param name="url" value="http://myserver.com/theora.ogv" />
    <param name="framerate" value="29" />
    <param name="keepAspect" value="true" />
    <param name="video" value="true" />
    <param name="audio" value="true" />
    <param name="bufferSize" value="100" />
    <param name="userId" value="user" />
    <param name="password" value="test" />
    </applet>

    Today all latest browsers support html5.

  5. Detailed steps are found at FLOSS Manual. The link of their website is given below in reference.

2. VideoPress plugin for WordPress site:

If you are running wordpress site which is either hosted in premium account or hosted by yourself, you can easily manage your uploaded video using videopress plugin. You can install VideoPress Plugin just like another plugin right from your WP dashboard. VideoPress Quick Start Guide is helpful resource.

3. Mediagoblin:

mediagoblin.org is a free software media publishing platform that anyone can run. You can think of it as a decentralized alternative to Flickr, YouTube, SoundCloud, etc. It required dedicated web server.

4. Embedding links from websites other than youtube:

You can upload and embed links from websites other than youtube like: tune.pk, gobblin.se, vimeo.com, dailymotion.com, veoh.com, metacafe.com, rutube.ru, break.com, and blip.tv.

Reference:

  1. FLOSS Manuals.
  2. W3School Tutorial on Video Tag..
  3. VideoPress.
  4. Mediagoblin.
  5. List of Video Hosting Services.

Location of Construction Joint

Following points are helpful to provide construction joint in RC Slab, Beam and Raft Foundation:

  1. Construction joint shall be provided preferably at a location where stress are zero.
  2. Construction joint is provided at one-third or end of support.
  3. Also provide key and rebar to transfer shear stress if shear stress is not zero at point of construction joint.
  4. Provide construction joints as minimum as possible.
  5. Construction joint shall not be left on discretion of contractor. It must be approved by designer.

Definition:

Construction joints are placed at the end of a day’s work. In slabs, they may be designed to permit movement and/or to transfer load. Often in reinforced concrete a conscious effort is made to clean the joint and bond the next day’s work.[1].

Explanation:

The number of construction joints in concrete structures should be minimized. If construction joints are necessary to facilitate construction, it is normally aligned perpendicular to the direction of the member. For beams and slabs, construction joints are preferably located at about one-third of the span length. The choice of this location is based on the consideration of low bending moment anticipated with relatively low shear force. However, location of one-third span is not applicable to simply supported beams and slabs because this location is expected to have considerable shear forces and bending moment when subjected to design loads. Sometimes, engineers may tend to select the end supports as locations for construction joints just to simplify construction. [2].

Construction joint is not preferred at midspan. When formwork removed from construction pours (delay in next pouring) and the beam (or slab) has had to cantilever from the previous support to the new construction joint. Also, joints at midspan do not typically work for post-tensioned construction. you need to accommodate anchorages and at approx 1/3 span works best. [3].

You need to provide a joint with key and rebars crossing the joint. In raft footing, at construction joint, shear force may not be minimum/zero. Hence you will have to leave dowels from one pour to another pour to transfer shear. You may calculate area of reinforcement required based on permissible shear stress as 0.45 fy. [4].

You can have your opinion and suggestion in comment box below.

Reference:

  1. CADMAN
  2. A Self Learning Manual – Mastering Different Fields of Civil Engineering Works (VC-Q-A-Method) by Vincent T. H. CHU.
  3. eng-tips
  4. sefindia.org

Additional Reference:

  1. ACI 302.1, “Guide for Concrete Floor and Slab Construction,” ACI Manual of Concrete Practice.
  2. “Slabs on Grade,” ACI Concrete Craftsman Series, American Concrete Institute, Detroit, Mi.
  3. “Cracks in Concrete: Causes, Prevention, Repair,” a collection of articles from Concrete Construction Magazine, June, 1973.

Debian4Engr Series 07: Installation of Blender

Following is one step guide for Installation of Blender in GNU Debian-cut and wheezy:

Installation:

In GNU Debian, write following command in terminal:

$ su
$ apt-get install blender

The latest version is available in testing repo and available by default in debian-cut

Reference:

  1. Get Blender from Blender.org

Debian4Engr Series 06: Installation of QGIS

Following is guide for installation of QGIS 1.8.0 in GNU Debian-cut and wheezy:

  1. Update sources.list:
  2. Update Packages for Wheezy for i386 and amd64 are available at:

    
    nano /etc/apt/sources.list
    deb http://qgis.org/debian wheezy main
    deb-src http://qgis.org/debian wheezy main

  3. Keyring:
  4. To add the the qgis.org repository public key to your apt keyring, type:

    gpg --recv-key 997D3880
    gpg --export --armor 997D3880 | sudo apt-key add -

  5. Installation:
  6. sudo apt-get update
    sudo apt-get install qgis

    If you also want python plugins make sure to install the optional python package:

    sudo apt-get install python-qgis

    If you want the GRASS plugin make sure to install the optional package:

    sudo apt-get install grass
    sudo apt-get install qgis-plugin-grass

  7. Note:
  8. As to date i.e., 30/09/12, qgis-plugin-grass was not installable because it required a package grass641 which is not available in any repo (stable, testing, unstable, experimental) of debian. I have reported the bug to QGIS issue tracking. For now, I upgraded to nightly build of qgis by changing sources.list as:

    deb     http://qgis.org/debian-nightly wheezy main
    deb-src http://qgis.org/debian-nightly wheezy main 
    

    Then followed the steps of installation heading as described above and successfully install all three packages, i.e, qgis, python-qgis and qgis-plugin-grass. QGIS 1.90 – Master was installed successfully.

  9. Reference:
  1. QGIS Official Installation Guide

Engineering Analysis & Design

%d bloggers like this: