News:

SMF - Just Installed!

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Mark Barkey

#91
Fortran / Fortran 77 statement examples
February 15, 2015, 11:25:27 PM
------------Program statement-----------------------------------

                Program coord


-------------variable declaration statements-------------------

                integer node1(50000), node2(50000), i, totn, j         
                double precision crd1(50000,3), crd2(50000,3)      
                character*100  line






#92
Useful Software / Re: Crimson Editor
February 15, 2015, 11:17:49 PM
To set crimson editor to place a line at column 72 for fortran 77 programming:

tools
preferences
visual
second column marker  (then enter 72)
#93
Useful Software / G95 Fortran
February 15, 2015, 10:20:34 PM
G95 Fortran g95-Mingw_201210.exe


local link:  http://forums.mbarkey.com/index.php?action=downloads;sa=view;down=2

http://www.g95.org/

Note:  the windows binary download link there is broken.

Quote
   G95 is a stable, production Fortran 95 compiler available for multiple cpu architectures and operating systems. Innovations and optimizations continue to be worked on. Parts of the F2003 and F2008 standards have been implemented in g95.
#94
Useful Software / Crimson Editor
February 15, 2015, 09:42:24 PM
Crimson editor is my favorite text editor for *.inp files, python files, fortran source code, data files, and other large text files.

-------------------------------------------------------------


http://www.crimsoneditor.com/

sourceforge link:  http://sourceforge.net/projects/emeraldeditor/files/

local link:  http://forums.mbarkey.com/index.php?action=downloads;sa=view;down=1



Quote
Crimson Editor is a professional source code editor for Windows.

This program is not only fast in loading time, but also small in size (so small that it can be copied in one floppy disk).

While it can serve as a good replacement for Notepad, it also offers many powerful features for programming languages such as HTML, C/C++, Perl and Java.

   Syntax Highlighting for HTML, C/C++, Perl, Java, Matlab and LaTeX. Also, it can be extended for other programming languages based on custom syntax files.
- how to make custom syntax files...
   Other features include undo/redo, user tools, macros, spell checker and more.
- see more crimson editor features...


Crimson Editor will be superceded by Emerald Editor. And, the lastest download version of Crimson Editor is maintained by The Emerald Editor Community.

Crimson Editor 3.72 Release (May. 14, 2008) - from sourceforge.net

Crimson Editor is FREEWARE. You are free to download and use it.
If you find it useful, please distribute it to your friends without any modification.

Crimson Editor 3.70 Release (Sep. 22, 2004, 1224KB) - from this site

System Requirements
Win95 or higher, WinNT 4.0 or higher
4MB free disk space

#95
Scripting and Python / How to run an ABAQUS python script
February 15, 2015, 09:39:50 PM
From the ABAQUS command line in the MS-DOS (command) window type:

abaqus python odbCoordinateReader2.py

where in place of odbCoordinateReader2 goes the name of your python script.

-----------------------------------------

From inside of ABAQUS CAE
file menu
run script
then select your script to run
#96
Scripting and Python / ODB Coordinate Reader
February 15, 2015, 09:35:29 PM
odbCoordinateReader2.py

Script to open an output database and print intial and final
coordinates of step 1 (first and last frames of step 1).

This could be updated by only writing out a node set instead of all the nodes.

Note that in order for this to be used, the output identifier COORD must
be written to the ODB. This is not a default setting for preselected field
variables.

M. E. Barkey 2/15/2015



"""
odbCoordinateReader2.py

Script to open an output database and print intial and final
coordinates of step 1 (first and last frames of step 1).

This could be updated by only writing out a node set instead of all the nodes.

Note that in order for this to be used, the output identifier COORD must
be written to the ODB. This is not a default setting for preselected field
variables.

M. E. Barkey 2/15/2015
"""


#based on ABAQUS 6.13 example
#9.10.3 An Abaqus Scripting Interface version of FPERT


import sys
from odbAccess import *
from types import IntType



# Get input from the user

odbName = raw_input('Enter odb name (w/o .odb): ')
odb = openOdb(odbName + '.odb')

modes = 1
factors = 2

#this reads the first frame [0] of the first step [0]
step = odb.steps.values()[0]
coords = step.frames[0].fieldOutputs['COORD']

#this reads the last frame [-1] of the first step [0]
steplast = odb.steps.values()[0]
coordslast = steplast.frames[-1].fieldOutputs['COORD']

#open a text ouput file and write the initial and final coordinates.
outFile = open(odbName + '.coordinates.dat', 'w')

#these text lines are 65 characters long
outFile.write('ODB Coordinate Reader********************************************')

header = \
"""
*****************************************************************
** Input ODB file: %s
** Coordinate data from the original mesh step 1 frame 0.    ****
*****************************************************************
"""

header2 = \
"""
*****************************************************************
*****************************************************************
** Coordinate data from the original mesh step 1 frame -1 (last).
*****************************************************************
"""

#the variable odbName is placed in the position of %s in the header
outFile.write(header % (odbName))
#this format statement if for the node label and tuple write
format = '%6i, %14.7e, %14.7e, %14.7e\n'

#the indent in python means a loop
for value in coords.values:
    outFile.write(
        format % ((value.nodeLabel,) + tuple(value.data)))
outFile.write('***** End of coordinates of first frame.*************************')


outFile.write(header2)

#this format statement if for the node label and tuple write
format = '%6i, %14.7e, %14.7e, %14.7e\n'

#the indent in python means a loop
for value in coordslast.values:
    outFile.write(
        format % ((value.nodeLabel,) + tuple(value.data)))
outFile.write('***** End of coordinates of last frame.**************************')



outFile.close()



#97
Welcome Center / Welcome to the forums
December 28, 2014, 08:51:26 PM
The purpose of this forum is a hobby website related to topics in the field of Mechanics, and in particular the use of the finite element program Simulia ABAQUS, Mechanics of Materials, and Fatigue Analysis.

My initial purpose of these forums is for me to document scripts/programs/analysis techniques so that I don't forget them.  Others are welcome to join and comment.

If you register, you will be able to view additional forums dealing with general ABAQUS CAE questions, ABAQUS scripting and Python programming, ODB file reading for ABAQUS and other topics as well as being able to download sample input files.

Please make a post about yourself in the welcome center, so that I know you are not a spam bot.  I suspect it will take a while to get people interested in this niche area, so please feel free to help me promote these forums.



My intention is to keep this forum advertisement-free, as I have found advertising clutter distracting when I have visited more established ABAQUS tip/help sites.


Here is my Youtube Channel (which is a work in progress):
https://www.youtube.com/channel/UCS5Ojenfz6cBWV1CX5pEwIA