|
[Sponsors] |
December 11, 2023, 01:54 |
User code tutorial (Fortran)
|
#1 |
New Member
Join Date: Sep 2014
Posts: 18
Rep Power: 12 |
Hello all.
I'm trying to utilize a user library in star-ccm+ that I created using Fortran source code, following a tutorial. However, I'm stuck. My environment is as follows: O/S: Windows10 CCM+: 2206.0001 (17.04.008-R8) Fortran IDE: VScode Compiler: gfortran Following the tutorial, I created five files: 1. StarReal.f 2. uflib.f 3. zeroGrad.f 4. initVelocity.f 5. sutherlandViscosity.f I tried to create a dynamic library (libuser.dll) using the following command: gfortran -shared -fPIC -o libuser.dll ./StarReal.f ./uflib.f ./zeroGrad.f ./initVelocity.f ./sutherlandViscosity.f However, I'm getting an "undefined reference to uffunc_, ufarg_" error. It seems like it can't find (link?) the uffunc and ufarg called in uflib.f (Because, when I used the following command, the library was created without any problems: gfortan -shared -fPIC -o libuser.dll ./StarReal.f ) I'm not sure how to resolve this. |
|
December 12, 2023, 22:02 |
FORTRAN is not supported on Windows.
|
#2 |
New Member
Join Date: Sep 2014
Posts: 18
Rep Power: 12 |
Sorry, I missed this sentence in manual :<
|
|
December 14, 2023, 20:29 |
Compiler option
|
#3 |
New Member
Join Date: Sep 2014
Posts: 18
Rep Power: 12 |
Sorry to keep repeating myself.
I added the CCM+ installation path to the compile options, and the library created with the Fortran code on Windows was imported into CCM+ correctly. |
|
Tags |
user code |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
adding velocity fluctuations on inlet by user fortran | Sergeyevichsky | CFX | 2 | May 18, 2017 23:42 |
User fortran to input/output file in a parallel run | doublestrong | CFX | 5 | March 31, 2017 09:15 |
CFD Code Conversion from Intel Fortran to GNU Fortran | pitto | Main CFD Forum | 4 | August 4, 2016 15:51 |
User fortran routines, DEBUG AND OUTPUT | Bloshchitsyn Vladimir | CFX | 5 | October 29, 2007 02:31 |
Context of user fortran functions | Bloshchitsyn Vladimir | CFX | 0 | October 17, 2007 07:28 |