• Ejaz Haider added an answer:
    How do I insert a reaction kinetic to Aspen Plus?

    I want to write a Fortran subroutine to insert a reaction kinetic to Aspen Plus, because the kinetic I have is not in the form as in Aspen Plus kinetics. As I don't know how to do that, I would be so grateful if someone send me a step by step procedure to follow.

    Many thanks.

    Ejaz Haider

    I also want to write a Fortran subroutine for reaction kinetic. If anyone could please send any material helpful for this, i will be thankful.

  • Ariadne Tsambani added an answer:
    I'm getting numerical singularity and excessive distortion error when I'm compiling UMAT with Abaqus. Can anyone please help me with this?

    I'm working on the cyclic behaviour of soil using Cam clay model. For the material part, I found a umat code. When I ran my job without linking (using in built clay plasticity), I'm getting reasonable results. But when I'm linking with the UMAT, it is not even taking geostatic step and is showing excessive distortion. I'm attaching my .inp file and the umat code along with this. Please go through it and suggest me where I'm going wrong.

    + 1 more attachment

    Ariadne Tsambani

    Good Evening. Please find attach the link

    .Regards Ariadne Tsambali

  • Shiv Narayan Nishad added an answer:
    Does anybody have the Fortran code for Lorenz 1996 model using RK4?
    Shiv Narayan Nishad

    Thank you Sir for your response, I have already written in 2014. 

  • Anji BABU Kapakayala added an answer:
    How do I write Fortran code for a simple harmonic oscillator using the velocity verlet method?

    Hi all,

    Can anybody explain how to write fortran code to solve simple harmonic oscillator by using velocity verlet method?????

    d2y/dx2  = -kx

    thanks in advance


    Anji BABU Kapakayala

    Thank you very much sir

  • Morton E. O'Kelly added an answer:
    Am writing some codes in fortran95, to read from a file and experiencing some problems, help?

    I wish to adapt my Fortran code to read these input files, then compile it. The adaptations should include:

    (1)    Have a loop for going through each line of input file

    (2)    Compute decimal year from year, month, day [DY]

    (3)    Compute colatitude from latitude [COLAT]

    (4)    Add the altitude to the CHAMP reference radius 6371.2 km [R]

    (5)    Use call subroutine igrf12syn(0,DY,2,R,COLAT, ELONG,X,Y,Z,F)

    I have attached my sample file and the programme


    + 1 more attachment

    Morton E. O'Kelly

    The main work is done subroutine igrf12syn. I think that what you are asking is how to call this repeatedly with all the the lines of data in your file? You need a loop --- read, call, read, call, ....

    You will have to do a little work to get your data in degrees and minutes as the program may expect data as 4 integers.... see this?

    WRITE(6,*) 'Enter latitude & longitude in degrees & minutes'
    WRITE(6,*) '(if either latitude or longitude is between -1'
    WRITE(6,*) 'and 0 degrees, enter the minutes as negative).'
    WRITE(6,*) 'Enter 4 integers'

  • Angela Aragon-Angel added an answer:
    Is anyone familiar with GPS interpolation in fortran?


    I am currently trying to reconstruct the range from GPS satellites using the position given by ephemerides. Papers claim that I can have a centimeter or even less, precision on the position of the satellites from interpolation with either Lagrange or trigonometric interpolation. Unfortunately, the softwares I used for this failed to provide me with a satisfactory precision (I need at most 1-m precision, and they provide me with 100)m). As a result, I turn to the community to know if anyone has experience in GPS ephemerides interpolation, and can recommand me a fortran software that can attain satisfactory precision.

    Thank you in advance for any answer.

    Angela Aragon-Angel

    Dear Laurène,

    I know that you are specifically dealing with GPS ephemerides but, looking at how some other Fortran programs for interpolating planet ephemerides may give you a guideline to proceed. Please take a look at:


    In particular, the programs:



  • Daniel C Elton added an answer:
    Why are physicists stuck with Fortran and not willing to move to Python with NumPy and Scipy?

    Nowadays all of the major Fortran related numerical calculus have exactly mapped equivalent libraries in more modern language framework like Numerical Python (NumPy) and Scientific Python (SciPy). 

    What keeps physicists stuck with Fortran?



    Scientific evidence?

    + 1 more attachment

    Daniel C Elton

    It really depends what the students are doing. 

    If they are analyzing a small data set and looking to make some plots, obviously python will be faster to code and easier to use. 

    However, for any serious simulation or numerical computation, Fortan will be many times faster. Also, if you want to parallelize your code (for clusters or GPUs) it is very difficult to do that with Python. Parallelization really can give a research group an edge and is becoming more and more popular. 

    I'd also argue that for many things Fortran is easier to learn than C and even Python. The programming model that Fortran uses is much easier to learn than the Object oriented model that Python is built around. If you wish to go object oriented, you can use Fortran 2003, but you don't have to learn it from the outset. 

    Fortran offers a nice mix of ease of use for numerical calculation and raw speed which is so far unmatched.

    The fact that physicists still use Fortran is more of an indictment of the computer science community than of physicists. The fact is, they have not yet developed a better alternative that combines speed and ease of use. The closest thing is the Julia language which is currently being developed. 

    I have written about this in much more detail on my blog (see attached link). 

  • Shaghayegh Ameri added an answer:
    How can i link the abaqus(64-bit) and fortran ?

    I've tried all the solutions proposed but i did not succeed.
    I've used all versions of Abaqus.

    Is there a special case that I do not do?

    abaqus versions is : 6.12-3 , 6.13-1 , 6.13-4 , 6.14-1

    Fortran : intel fortran composer XE 2013

    Microsoft Visual studio 2012

    Shaghayegh Ameri

    I should mention that I think I made the connection, because when I open abaqus I see intel compiler and others before abaqus licence manger check, in abaqus command, and then it open. But in verification subroutine doesn't pass and the error I pasted was from std_user.log file.

  • Deniz Aktaş added an answer:
    Hello , how can i link Fortran and Visual Studio with Abaqus?

    I want to write a subrotine for a non-uniform heat source .

    (Abaqus version 6.13)

    thank you

    Deniz Aktaş

    Heyy all,

    Abaqus 6.14-1 has been achieved to link with Fortran Composer XE 2013 and Intel Visual Studio 2012. But my problem is beyond the Abaqus link.  

    When I toggle "start without debugging" simple Fortran code in VS2012, debug output window has no data. And In VS2012, I controlled that tools>options>debugging>general "Redirect all Output Window text to the Immediate Window" unchecked. Anyone has idea? 

  • Zhang Bai added an answer:
    How do I write FORTRAN subroutine to simulate the kinetic of the oil shale retorting reaction?

    As oil shale retorting process is complicated thermochemical conversion process.For modeling of the oil shale retorting process. a FORTRAN subroutine is necessary in the model to simulated the kinetic of the retorting reaction.

    Zhang Bai

    The main function for  FORTRAN subroutine in Aspen Plus simulation of oil shale pyrolysis is to control the reaction conversion rate, and the kinetics characters need to be emperimentally identifed.

  • Alfonso Limon added an answer:
    How do I validate results for an analytical model of the sound transmission through an hemispherical shell?

    Dear all,

    As I have a bit of free time, I went through an aborted project which was originally a part of my PhD. This was an analytical model of sound transmission through an hemispherical shell. At that time my computation were too slow on MATLAB and I had to switch to a FORTRAN program. However as it took to much time to implement, and as no validation was done, I stopped working on it.

    Now, 5 years later, I went through my backup from the university, and run my MATLAB script. Surprisingly, it took less than 5s to compute the solution ! I would be keen on validating my analytical model, as possible using results from numerical models, such as FEM. Do you know anyone who would be able to provide validation results ?



    Alfonso Limon

    Have you tried using some of Norman Barnett work, he has both analytic and experimental results which might be of some use:


  • Mike Borowczak added an answer:
    Any advice on the DFLUX subroutine in abaqus error?


    I am trying to run DFLUX subroutine in abaqus, When i am trying to compile,

    Abaqus showing error "problem during Compilation -C:\New folder\ text.for"

    subroutine name -text.for

    abaqus version:6-14

    fortran version: 4.0

    anyone please help me to sort out this error

    Mike Borowczak

    How did you specify the directory to compile? There seem to be multiple spaces within your file and folder structure which often leads to issues. 


    1. Replace/rename the directory and file structure to omit the spaces  e.g. C:\New_folder\_text.for
    2. Escape spaces using the caret (^) in windows e.g. C:\New^ folder\^ text.for
    3. Wrap the file in quotes ("") e.g.  "C:\New folder\ text.for"
  • Mehdi Mahmud added an answer:
    Post processing (mesh data format)

    Hi everyone,

    I have generated file data from Fortran which contained all informations about a mesh. how I can use these data or convert it so than it can be analysed in Abaqus, COMSOL,Ansys,.etc.

    in other word what is the exact order or requirements by the following software for a created mesh by a script in fortran or another programming  language.

    may thanks for your help

    Mehdi Mahmud
    thanks Panji for your answer. do you know an easy way to export it from Matlab? I really interested to use COMSOL or Abaqus.
  • Nuno Sidónio Andrade Pereira added an answer:
    How can I create a Graphical User Interface for FORTRAN code?

    Hi all,

    I have developed a code using Fortan included in the Microsoft Visual Studio 2010. I would like to create a graphical user interface GUI for this code but I don`t know how to do that in easier manner.

    Could anyone please share his experience on such coding development ? is the Microsoft Visual Studio 2010 can do that or should I use other programming languages such Visual Basic, or Delphi or ... to do that ? I`m really confusing on how to start doing this and I would appreciate any suggestion and help.



    Nuno Sidónio Andrade Pereira

    OK if you are a windozzz developer. The world is not only about windozzz. Intel fortran is probably the best fortran compiler in the market but if you want something platform independent forget the visual-* stuff. I stick to python + intel/gfortran. btw: you can get a non-commercial licence for intel fortran.

  • Melio Saenz added an answer:
    Can anybody suggest how to model different wetting-drying path in FORTRAN for unsaturated soil?

    Can anybody suggest how to model different wetting-drying path in FORTRAN for Unsaturated soil?

    Melio Saenz

    Please revise Randel Haverkamp works.....

  • Berna Uyanık added an answer:
    Why is fortran extensively used in scientific computing and not any other language?
    I deal in computational solid mechanics and I heard from many people that for a short code best choice is matlab and for large code (more than 1000 lines) obvious choice if fortran. For VUMATS, people use fortran. I will start writing some large codes soon, so I just wanted to know whether should I do it them in fortran? Why not modern programming languages such as c++ or java?
    Berna Uyanık

    Dear Schröder, human DNAs, also have old cores. Programming languages are a small part of something big structure. 

  • Larbi Gueraiche added an answer:
    How can I reformat a VUMAT Subroutine for using in Abaqus?


    I plan to use a VUMAT subroutine for modeling the material damage for a fiber reinforced composite material (the notepad file is attached). I copied it in the visual Microsoft studio but it showed several errors . I appreciate if you can help me to reformatting this subroutine (pleases see the attached FORTRAN file) . 

    Thank you for your time. 

    + 1 more attachment

    Larbi Gueraiche

    Hi Ghafarizadeh,

    Could you follow the link bellow and take a look starting on page 51.

    I hope you get it helpful.

  • Anton Skorkin added an answer:
    Do you know how I can get inverse of a matrix that its determinant is zero or very near to zero?

    i model a shell in fortran code,and i calculate normal vector and deformation gradiant for it,but somewhere in the solution the z-direction of normal vector become so small and it cuase the determinant of defo-gradiant become so small and near zero and for inverse of it the element become so big and cause a problem,i want a way to avoid this

    Anton Skorkin

    In that case, if the determinant is zero matrix - the inverse matrix does not exist.

  • Niraj Kumar Jha added an answer:
    What is the most efficent way to postprocess UEL in Abaqus ?

    Hello Abaqus user,

    As you all aware the visualization of results associated with user elements is not supported by abaqus viewer. I tried to follow the guidelines provided in Abaqus manual to access the results file but no success so far.

    Method -1

    I used fortran interface (attached -source : http://forum.cadec-online.com) to read the results from the .fil-file with ABQmain subroutine.

    abaqus make job=filToBin.f

    This provides me filToBin.o file with the Note: declarations in dependent base » cow_Btree < odb_String , odb_Instance > " could not be found


    Other tricky way which i figured out is  to superimpose another element on the UEL element. which runs on UMAT.   UMAT communicates with UEL via  COMMOM statement  and solution dependent variables (SDV).

    I am more interested to visualize my element using Method-1. Is there any detail explanation to do so ?  can somebody guide me please?

    Niraj Kumar Jha

    Thanks Anshul..It is helpful

  • Manish Kashyap added an answer:
    Which is the best alternative to Matlab?
    Matlab is an excellent software, but it is commercial and its price is very high. Other alternatives are available (Octave, Scilab, Freemat, ...) but each one has pros and cons. Is there a real competitor of Matlab?
    Manish Kashyap

    GNU Octave is very useful as it provides the best alternative to MATLAB in terms of MATLAB compatibility. There ate huge amount of common toolboxes in both with similar function syntax. Octave 4.0.0 is released with GUI interface which is very much similar to MATLAB. Here you can find some video tutorials on OCTAVE 4.0.0 for image processing together with step by step installation. 


  • Harikrishnan Surendran added an answer:
    How can I choose between MLE based and least squares based methods for fitting species abundance distributions?

    The SADs package in R enables fitting species abundance distributions through maximum likelihood models, which is intuitively attractive. However, it seems like the fortran program RAD written by Werner Ulrich enables testing of a greater number of models. Should I use RAD simply because it allows fitting a greater number of models?

    Harikrishnan Surendran

    Thanks for your help. I will have to go through more than one of your papers.

  • Aleksandr B. Sahakyan added an answer:
    How to compile "NBO 3.0"?
    I am trying to compile an old version of NBO available at CCL:

    I tried to compile the fortran source as a stand-alone according to the manual using the "enable" program. The "enable.for" source compiles without problems and the enable program generates a new "GENNBO.FOR" source from the "nbo.src" file. However, when I try to compile "GENNBO.FOR" I get lots of compiler errors and warnings. I tried different compilers (g77 and gfortran) with different compiler settings under different operating systems (win32 and linux64).

    Does anyone know how to compile this NBO source under modern operating systems?

    P.S.: I know that there are newer versions of NBO, however, I wanted to see whether the software is useful for me before spending any money for it.
    Aleksandr B. Sahakyan

    From the compiler (gfortran) error messages, it looks like NBO 3.0 code uses some obsolete language features, which are not permitted by the compiler even while using "-std=legacy" option. However, the similarity of the error message to the following case:


    might hint that the NBO 3.0 code was wriiten using operations that are 32-bit-specific, resulting in failures on 64-bit computers. Unfortunately, I do not have access to a 32-bit computer to confirm this... Any luck?

  • Ramiro Checa-Garcia added an answer:
    Which is the best open source FORTRAN compiler?
    I am using GNU gfortran, but I am not always satisfied with compilation. Can you suggest me another open source compiler?
    Ramiro Checa-Garcia


    I am using gfortran without any problem and in general I am satisfied with the performance. I recommend you to take a look on the gfortran flags on the links that I have included in this post.

    In general not all people is aware about Fortran 77 vs Fortran 90 vs Fortran 95... which means that some flags like -std=f95 might not be appropriate for your code.

    Fortran 90 is huge improvement over Fortran 77 but still backward compatible. However there are some features considered obsolescent in Fortran 95 regarding Fortran 77. This means that if you compile as standard F95 code then old code might be reporting errors during compiling. Even if you compiler is able to compile you should be aware about these differences. For this I recommend you take a look to the 3rd link I am including in this post about modernizing old fortran to ensure a correct compilation.

    If you need to use C procedures inside your Fortran code then you have to go to Fortran 95 compatible compilers, gfortran do this pretty well.

    Given another opportunity to gfortran!!

    + 2 more attachments

  • Negar Kamali added an answer:
    System error code 1073740940 when using UEL ?

    I'm trying to run an analysis with a simple UEL subroutine that I wrote and after compiling, linking, analyzing the input file and the subroutine suddenly it crashes with this error:

    Abaqus Error: The executable standard.exe
    aborted with system error code 1073740940.
    Please check the .dat, .msg, and .sta files for error messages if the files

    has anyone encountered this before? I can not find a bug in my code (I write out all the matrices and they're all correct) I also checked everything else that comes to my mind.

    P.S: I can run other subroutines to the completed stage

    Negar Kamali

    Sure, I'm going to use my own problem with this error code as an example for you.  One time, I had used WRITE(*,*) in my subroutine like this:


    !DO K1=1,24


    whereas the dimensions of amatrx was 16 by 16 ( I should have used just ndofel intead of the number but I was in hurry and just wanted to check), another time I allocated a parameter (ndof) to a number in the subroutine and it was different from my input file. This kind of mismatches had produced that error in my case. 

    hope that helps.

  • Prasad Anil Kulkarni added an answer:
    Is there any information of implementing the UFIELD and UFRIC subroutine ?

    Hi friends,
    Can someone tell me how does the USER SUBROUTINE UFIELD and UFRIC works? and how can it be implemented with a small example. and Is there any method to link UFRIC and UFIELD if so how? in general if I need a information from UFIELD as input to UFRIC subroutine then how can I pass it? Is that I should use a utility subroutine for data transfer between two subroutines? if so how can i use utility subroutines to link the two user subroutines.

    Is there any utility subroutines for FRIC or UINTER subroutines? I found some utility subroutines for UMAT like SINV or SPRINC etc. in the same way are there any utility subroutines for UFRIC or UINTER or UFIELD? 

    I am new to ABAQUS and ABAQUS subroutines. Please help me.

    Prasad Anil Kulkarni

    thanks sir for your help. 

  • Lijuan Yan added an answer:
    Does anyone know where to download or purchase the fortran program DISTLM for PERMANOVA (Anderson 2005)?

    Does anyone know where to download or purchase the fortran program DISTLM for PERMANOVA (Anderson 2005)? I am currently analyzing Miseq data and need it for testing the significance of the treatment on microbial community composition. Our group is going to purchase the PRIMER program, but it takes time to proceed as it is summer holiday season here.

    Lijuan Yan

    Thank you Jane. Our research group bough Primer software two months ago. Now I have all I need. Best wishes!

  • Partha Sarathi Majee added an answer:
    Can anyone help me with a Fortran code to solve interface tracking problem by level set method?

    Those who are solving fluid problem by level set method

    Partha Sarathi Majee

    Thank you very much Sir for the information.

  • Cynthia Evangeline Sellinger added an answer:
    What is the best programming language for solar radiation data processing?

    I just programmed macros in Excel, but I realize that sometimes (when the databases are very large and I would like to calculate many specific variables ) consumes many resources and computing time. I hear of people using Python, Fortran, C++, etc., but what is the best?

    Cynthia Evangeline Sellinger

    Interactive Data Language (IDL) works great for programming large data sets.  Not only can you use the built-in statistical packages, but this language handles a large, matrix of information with ease.

  • Simon Schröder added an answer:
    Are programming language performance benchmarks relevant in multi-platform applications?

    Let's take Javascript as an example. It's not the best language for heavy computing in comparison to say C++ or Fortran, but it can work across nearly all platforms (Which is an advantage I find very useful). However, I find it hard to take benchmarks into consideration owing to different engines across platforms (Like Chrome's V8 and iOS's Webkit). Also, different CPU architectures are a major factor.

    So the question is: Do benchmarks hold relevance when considering multiplatform applications?

    Simon Schröder

    Most of the time benchmarks will give you skewed results. Two different computers will produce different results. How will you make sure that neither the OS, nor the CPU architecture, nor the amount and speed of RAM influences the results? If you don't use identical hardware it is impossible to tell what you are benchmarking. What you can actually benchmark is how your solution will scale with problem size (but this is only for one platform). If you have different kinds of hardware you need to set a baseline for every platform independently. As a baseline you can, for example, provide another script written in the same language. This will set a baseline on all platforms. You might have a chance to compare your script to this baseline on each platform separately.

    I am not sure if this approach will make sense as I have not thought this concept through. But, for now I am really skeptical when I see comparison between different platforms.

  • Amirhosein Bashiri added an answer:
    Can anyone help me to modell a 3d curved pipe with fortran 90?

    i want to write a CFD code solving N-S eqautions with finite difference method  with fortran . my problem is how to use fortran to create a staggered mesh  for 3D curved pipe .

    can any one help me ? 


    Amirhosein Bashiri


    did you know how to implement it using Fortran?

    did you know any good practical refrences about grid generation in Fortran?

    thank you for your Answer

About Fortran

Sharing FORTRAN knowledge

Topic followers (348) See all