- Index
 - » Users
 - » Rafal
 - » Profile
 
Posts
Posts
 Hello,
I have a small FORTRAN Project which is composed of several source files .FOR. The FORTRAN Project consist of a Main program, which calls several subroutines. 
As I tried to call the Main program in Modelica, the following questions appeared:
1. I guess, that all .FOR files should be placed in the working directory i.e. by default in C:\...\AppData\Local\Temp\OpenModelica\OMEdit, is this correct?
2. which file should I actually call in by the external clause in Modelica? .FOR, .exe, or yet another one?
  when I have a model in Modelica:
model ExternalFortranCall
  parameter Real Di = 24.5;
  parameter Real Ws = 6.5;
  Real Da;  
  function MAIN_program
    input Real di;
    input Real ws;
    output Real da;
    external "FORTRAN 77"
  end MAIN_program;
equation
  Da = MAIN_program(Di, Ws);
end ExternalFortranCall;
I put MAIN_program.FOR and MAIN_program.obj into the working directory and I still obtain notice "undefined reference to 'MAIN_program' during compilation of Modelica model. 
Could anybody tell why is that? I would appreciate all suggestions.
Thank you.
 Hello,
I made a water flow model but it works only under specific conditions i.e. tolerance must be 1e-3 and number of nodes must be equal to 6. If I increase number of nodes or decrease tolerance, I get the following error:
stdout | unknown | <p>DASKR--  AT T (=R1) AND STEPSIZE H (=R2) THE                                    
      In above,  R1 =  4.6706168928947E+002   R2 =  2.1979412737018E-013
DASKR--  NONLINEAR SOLVER FAILED TO CONVERGE                                    
DASKR--  REPEATEDLY OR WITH ABS(H)=HMIN                                         
Could anybody give me a hint, why do I get this error when I manipulate tolerance and number of nodes?
Here is a short information about the model:
it is a flow model developed on the basis of Flow1DFV2ph model in ThermoPower library. The model was modified by adding momentum balance for each node and condensation heat transfer model. I would like to simulate this model with the SourcePressure with time-dependent pressure signal at the inlet, and sinkMass with time-dependent mass signal at the outlet. 
Thank you in advance for your help,
kind regards,
Rafal
 Hello,
I have a .dll model describing behavior of a component. How can I connect this .dll with a Modelica model?
Thank you in advance,
best regards
- Index
 - » Users
 - » Rafal
 - » Profile
 
