Science topic
Programming in Fortran - Science topic
Explore the latest questions and answers in Programming in Fortran, and find Programming in Fortran experts.
Questions related to Programming in Fortran
mpi.mod is the error
#funwave
#linux
#gfortran

Dear all,
I would like to update the yield strength value in a UMAT subroutine in Abaqus. This would happen when a load is applied on an element, the deformation strain would be queried from a meta-model database, and depending on the deformation strain combinations returned by abaqus, the yield strength of the material in the function PROPS() would be updated from the database. I am very new to writing subroutines in ABAQUS. I was wondering if there is a way to implement such an algorithm to update the material properties in each time step. If so, how can I start tackling this issue?
Any help is greatly appreciated. Thanks.
Dear All,
Hope you are fine and doing well in this pandemic.
I am working on a FORTRAN program, where I need to sum the Gaussian functions over time. I have observed that my computing time is scaling linearly with the number of iterations. I found FFT is useful for such tasks while reading about techniques to reduce the iterations. So, my question is if FFT can efficient for my task, how can I implement it?.
Pseudocode or suggestions are appreciated.
Cheers!
Anji
For Example, I have a South Carolina map comprising of 5833 grid points as shown below in the picture. How do I interpolate to get data for the unsampled points which are not present in 5833 points but within the South Carolina(red region in the picture) region? Which interpolation technique is best for a South Carolina region of 5833 grid points?

I am using MS Visual Studio Fortran. I need to incorporate the ERF function in my code.
How to use erf function? I have tried with the example given in help of MS Visual studio, however, it is not working. Kindly help.
Does anyone have any helpful information (Organised governing equations & subroutine files) about Two & Three surface models which are developed by Shen & Goto respectively?
Regards,
Qusay
I want to know How I can map the stress when preformed buckling and post-buckling.
I read in one thesis, author mentioned about SIGINI/HARDIN subroutines. Unfortunately he did not explain about it or provide the code. I have got the residual stresses distribution however its not for the full scale section
So, i want to map these stresses/strains to the section using SIGINI/HARDIN subroutines.
Any guidence please?
Which programming language is the best to use in CFD?
FORTRAN, MATLAB or any other?
Is there difference between the performance of these codes and applications such as OpenFOAM?
I would like to write data in fortran (90 and onwards including 2008) binary format to get the result much quickly and convert into text file so that data can be visualized using Matlab or R.
hi .
Abaqus question;
Hi, I have intel visual fortran compiler 9.1 and Abaqus 6.13-2 versions. I want link abaqus-fortran.
Afte following suggestion here , I did the following.
Abaqus cae..properties . "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\vcvars64.bat" & "C:\Program Files (x86)\Intel\Compiler\Fortran\9.1\em64t\bin\ifortvars.bat" && C:\SIMULIA\Abaqus\Commands\abq6132.bat cae || pause
Abaqus command..properties . "C:\Program Files (x86)\Intel\Compiler\Fortran\9.1\em64t\bin\ifortvars.bat" & "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\vcvars64.bat" && C:\Windows\SysWOW64\cmd.exe /k
Abaqus verification .properties . "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\vcvars64.bat" & "C:\Program Files (x86)\Intel\Compiler\Fortran\9.1\em64t\bin\ifortvars.bat" && C:\SIMULIA\Abaqus\Commands\abq6132.bat -verify -all –log
And also I opened abq6132.bat file and I modified as
@echo off
@call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\vcvars64.bat"
@call "C:\Program Files (x86)\Intel\Compiler\Fortran\9.1\em64t\bin\ifortvars.bat"
"C:\SIMULIA\Abaqus\6.13-2\code\bin\abq6132.exe" %*
But still I get the error
LINK : fatal error LNK1181: cannot open input file 'msmpi.lib'.
In my Programfiles(X86) I could not find any file named 'msmpi.lib' in any visual studio or fortran or abaqus folders.
Can anyone please help me in solving this issue.
Thanks
Does the Linux version of Abaqus provide the user with more freedom and control over the simulation? Can the necessary subroutines be written in Python?
I am in the process of establishing the appropriate initial conditions of a saturated soil base, submerged in water (i.e. a seabed). I have encountered some difficulty initializing stresses and void ratio for coupled pore-stress analysis using the built in Abaqus functions and as a result, I need to make use of subroutines SIGNI and VOIDR. I have searched the ABAQUS documentation and google for any examples of these subroutines, but the best I can find is simple descriptions like this, which do not offer any examples of actual code: http://web.mit.edu/calculix_v2.7/CalculiX/ccx_2.7/doc/ccx/node264.html
Does anyone have a sample of SIGNI and VOIDR subroutines that you have written and implemented in a simple Abaqus model? If I could just see how the two subroutines are applied to a working model, I can certainly extrapolate and adapt the code to meet my particular model specifications.
Related to project:
I am attempting to conduct a coupled pore-fluid/stress analysis beginning with a geostatic step but I am having convergence problems, in particular the error for ZERO VOLUME FLUX.
After some research, I learned that I can manipulate General solution controls so this error is eliminated, but I am not sure which field to change or what value to change it to.
Also, there is a bug in the CAE software that prevents changing the general solution controls using the GUI, which means I must manipulate the input file. Between which lines in the input file does the *Controls edit go? Can anyone include a sample input file with this implemented?
Attached is the input file for my model.
Dear researchers,
I'm looking for an open-source FEM software compatible with ABAQUS subroutines. I know there are a few open-sources FEM software available. But the question is; Is there any open-source FEM compatible with ABAQUS routines? or can be compatible with minor changes in the code?
To conduct my simulation, I need to run a few routines but they are ABAQUS subroutines and are written in FORTRAN and I don't have access to ABAQUS license for now. I know that ABAQUS has a student version, but this version has limitations among which is a restriction on running routines.
Any comments and pieces of advice are highly appreciated.
Best,
Farhad
I m trying to extract energy at each integration point in Abaqus. I can do it for stresses or strains but i cant do for the energetical quantities. The obtained error is : “KeyError: 'ELEN'”, but in Abaqus it is the good keyword… Below it is my code to extract it :
from odbAccess import *
import numpy as np
odb = openOdb(path='C:/Desktop/Fish1.odb')
# lastFrame = odb.steps['Step-2'].frames[-1]
lastFrame = odb.steps['Step-1'].frames[-1]
topCenter = \
odb.rootAssembly.instances['PART-1-1']
stressField = lastFrame.fieldOutputs['ELEN']
field = stressField.getSubset(region=topCenter,
position=INTEGRATION_POINT, elementType = 'CPS3')
fieldValues = field.values
sortie = open('C:/Users/tests.txt', 'w')
sortie.write('Eleme \t Integ \t\t PE11 \t\t\t PE22 \t\t\t PE12 \n')
for v in fieldValues:
sortie.write('%-10.2f'% ( v.elementLabel))
if v.integrationPoint:
sortie.write('%-10.2f'% (v.integrationPoint))
sortie.write('%-10.3f\t\t %-10.3f\t\t %-10.3f\t\t %-10.3f\t\t \n'% (v.data[0], v.data[1], v.data[2], v.data[3]))
sortie.close()
Hi,
Is it possible to import output result of Matlab(for example eps format i.e mesh. eps) in Fluent or CFX?
This output result of Matlab is a mesh file.
Another question:
Is it possible to export output result of Matlab in Fluent or CFX?
Thanks for your help.
best.
I am simulating a metal cutting process in Abaqus / explicit and want to implement a damage model using the VUSDFLD and VUHARD subroutines. As it is the first time I am going to write a subroutine and I am not experienced with programming, I do not have idea on how to do it.
Does anyone could share any examples of these two subroutine models (pdfs or a fortran file) from which I can base my work on? It would be a great help!
Thanks
Hi !
I'm a MSc student working on an annual long term survey of Maldivian coral reefs. I would like to use the Wave Exposure Model (WEMo) for a hydrodynamic impactassessment. I have some problem with the used software... I downloaded and installed the WEMo Version 4, (ArcGis 10.2 is installed) but when I try to open it an error text appeared :
"Run-time error '-2147221002 (800401f6)' :
ArcGIS product not specified.You must first bind to an ArcGIS version prior to using any ArcGIS components"
What I have to do ? Do you have some advices for me ??
Thank you for your help,
Fanny
The array elements include zeros in the first few rows and standard scientific notation real elements in Fortran format in other rows. The result of the code I wrote does not give me the exact input data. Negative signs are omitted and the values of the exponents are also ignored.
Find below the code written and the attached file containing the array elements in .txt format to serve as the input data
program test_processing
implicit none
integer :: j
integer :: i
integer, parameter :: n=800
integer, parameter :: m=800
real, dimension(m,n) :: g
real, parameter :: out_unit=6
open ( unit=15,file="recvx_4.txt", status='old', &
access='sequential', form='formatted', action='read', RECL= 1200)
call random_number(g)
do i=1, m
do j = 1, n
read (15, 110) g(i,j)
110 format (800(18X,E14.5E3))
write (6, 120) g
120 format (800(18X, E14.5E3))
open (6,file="matrix.txt",action="WRITE",status="replace", RECL = 1200)
write (6,120) g
PRINT *, g
close (6)
end do
end do
end program test_processing
Hello, everyone. I'm interested in the CICSAM scheme and HRIC scheme. I have difficulty to apply the CICSAM or HRIC scheme in FORTRAN. Who can send me a simple CICSAM or HRIC scheme code FORTRAN. I appreciate your help.
IFTRAN is a precompiler that produces FORTRAN code. It was developed in the 1970's.
We are currently using a FORTRAN-based software developed in my institution, and I would like to compare its performance with other available software.
I would like to learn FORTRAN to build a solver for numerical difference techniques..so I would be delighted to know where to start with and how to proceed.
Hi
I have wrote a program in FORTRAN 95 but it has an error.I do not Which part of my program is wrong.
Could you help me? Thanks.

I have installed CYGWIN interface with a GNU fortran 77 compiler on my system.
When I want to compile a file with this compiler I have to navigate to the folder that the source file is. The question is that how I can compile an arbitrary Fortran code from any where simply refering to its location. For more details please follow these commands that I quote from my cygwin command windows:
--------------------------------------------------------------------------------------------------
farzi@farzi-PC /cygdrive/c/a
$ dir
mytest1.f
farzi@farzi-PC /cygdrive/c/a
$ g77 mytest1.f -o mytest1
farzi@farzi-PC /cygdrive/c/a
$ ./mytest1
Enter number of equations (up to 1000): 5
exact = 0.0666666667
Max. difference was 0.000000000000% of the exact in eq. No. 1
Solution of the linear system of 5 equations took 0.00 seconds
Want to run again (y/n) ? : n
------------------------------------------------------------------------------------------------
The compile is successful(after navigation to the source folder in c:\a).
However, note the following alternative:
-------------------------------------------------------------------------------------------------
farzi@farzi-PC /cygdrive/c
$ /cygdrive/c/a/g77 mytest1.f
-bash: /cygdrive/c/a/g77: No such file or directory
farzi@farzi-PC /cygdrive/c
$ g77 /cygdrive/c/a/mytest1.f
g77.exe: /cygdrive/c/a/mytest1.f: No such file or directory
-------------------------------------------------------------------------------------------------
This time the g77 fails to compile the sample code.
How I can resolve this problem?
Hello,
I am a beginner in Fortran Programing ,
I have conceived a numerical code with Finite Volume Method , in an enclosure
can any one tell me how I can create a solid adiabatic(a blocked_off regions) inside an enclosure
I found in Patankar's book that it mus retain the source terms , Sp=-10e30
But I can't do that with velocity contour.
When the thermal cycles of welded structures are simulated with ANSYS APDL, codes are programmed in Fortran.
My question is whether in the case of ANSYS CFX the same programming language used.
Has anyone worked with grib or netCDF files using Fortran? I want, for instance, to find the min/max values of my table etc. Do I have to use the grib filter each time I want to download the data or is there a way to extract each value I want through the code?
I have an R package and I want to update it by giving the option to run a pre-compiled .dll made from a Fortran source, since by this way it is very fast.
The problem is that I'd like to have except .dll (Windows executables) the .so files (linux executables) in order for the package to continue be platform-independent.
Is there any way to produce both of them? I have downloaded 'Eclipse' tools - will they help for this reason? (I am working with Windows 7 and GCC GNU compilers for the moment; Cygwin also available).
Any suggestions? Thank you.
I would like to know if a function/subroutine/system call exists to output the amount of physical memory used by my Fortran code.
I'm currently facing some memory leaks and I would like to understand exactly where they are coming from.
I am using ifort compiler on windows (Intel Inspector is not an option for the moment).
I have a matrix and i have shown the output of matrix one by one element in FortranForm.
the problem is i want to put "&" continuation charater in output because when I am copying the data into fortran Code, Fortran is showing warning that it exceeds 2048 characters .
So i wanted to put ampersand character in each output of matrix element in FortranForm. please help
Looking for Fortran compiler suitable for TRNSYS 17. Any suggestions and recommendations are welcome.
Hope that there is alternative for Intel Visual Fortran software, which could be used for Type creation and compilation.
I mean in the general CAE programs such as ANSYS, ABACUS, Matlab and etc the more cores, the faster computing or the more maximum frequency of each core, the faster computing.
I need to run a 3 dimensional DEM simulation by Multiphase Flow with Interphase eXchanges (MFiX) software. So, I need to make a Particle_input.dat file. However, I don't know how can i make this file for 3d simulation. In "tutorials>FluidBed_DES" folder there is the only particle input file that is for a 2d simulation.
Would you please let me know the data structure in a Particle_input.dat file for a 3d simulation?
I may want to modify an existing FORTRAN code that someone else has made, however, I would like to modify the code and see where should I fix when encountering an error after modifications. To put it simple, I want to know where does the calculation stop.
A better complex random number generator FORTRAN program, whose order of magnitude ranged from zero to unity.
I am using GNU gfortran, but I am not always satisfied with compilation. Can you suggest me another open source compiler?
I'm using NetCDF 4.2 with Fortran90 (using intel compiler on a nehalem system) and the memory seems to be related to the buffers of each file. But the memory use keeps growing even when the files are closed and I open new ones
I ended up writing a script around my fortran code to call it several times (only working on 150 files at a time) but this is rather annoying.
Any suggestion ?
I'm looking for a good editor and compiler for fortran in OSX operation system