Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » greghowe
  • » Profile

Posts

Posts

Hello

I am trying to model an open channel flow using Openmodelica and I would like to know if it is possible to add an external solver for nonlinear systems.
To explain simply my question, I want to solve a nonlinear system in OM with the acausale approach by using a solver other than those proposed by OM(Newton, Kinsol..).

Is it possible?

Thank you in advance for your answer.

Hello,

Is it possible to simulate a PDE system with a variable time step?

thanks for you answers

Hello

I'm trying to simulate a simple finites differences scheme applied to the shallow water equation in 1 dimension(x) , where the discretization is only applied to the spatial coordinate x then I let modelica solving the whole system by using it's solvers.
the problem is that the program is runing indefinitly and it doesn't even  show an error message, which bring me to close OMEdit and restart it again.

So can someone please tell me what could be the cause of this kind of problem.


here is the code :

Code:

 

model SVDF

  /********Différences finies****************/
  import Modelica.SIunits;
  //nombre de pas(section)
  parameter Integer n = 32;
  //Longueur du canal
  parameter SIunits.Length L = 32000;

  constant Real g = 9.81;
 
  //vitesse
  SIunits.Velocity V[n + 1](start = fill(0, n + 1));
  //aire d'une section
  SIunits.Area S[n + 1](start = fill(20, n + 1));

protected
  //longueur d'une section
  parameter SIunits.Length dx = 32000 / n;
equation
  for i in 1:n loop
  V[i + 1] * S[i + 1] - V[i] * S[i] + dx * der(S[i]) = 0;
  dx * der(V[i] * S[i]) + V[i + 1] ^ 2 * S[i + 1] - V[i] ^ 2 * S[i] + 0.05 * g * (S[i + 1] ^ 2 - S[i] ^ 2) = 0;

  end for;
//CL
  S[n + 1] = 20;
  V[1] = 0;
end SVDF;

Thank you very much for your answers.

May-19-14 19:01:35
Category: Programming

Hello

I'm trying to simulate a simple finites differences scheme applied to the shallow water equation in 1 dimension(x) , where the discretization is only applied to the spatial coordinate x then I let modelica solving the whole system by using it's solvers.
the problem is that the program is runing indefinitly and it doesn't even  show an error message, which bring me to close OMEdit and restart it again.

So can someone please tell me what could be the cause of this kind of problem.


here is the code :

Code:

 

model SVDF

  /********Différences finies****************/
  import Modelica.SIunits;
  //nombre de pas(section)
  parameter Integer n = 32;
  //Longueur du canal
  parameter SIunits.Length L = 32000;

  constant Real g = 9.81;
 
  //vitesse
  SIunits.Velocity V[n + 1](start = fill(0, n + 1));
  //aire d'une section
  SIunits.Area S[n + 1](start = fill(20, n + 1));

protected
  //longueur d'une section
  parameter SIunits.Length dx = 32000 / n;
equation
  for i in 1:n loop
  V[i + 1] * S[i + 1] - V[i] * S[i] + dx * der(S[i]) = 0;
  dx * der(V[i] * S[i]) + V[i + 1] ^ 2 * S[i + 1] - V[i] ^ 2 * S[i] + 0.05 * g * (S[i + 1] ^ 2 - S[i] ^ 2) = 0;

  end for;
//CL
  S[n + 1] = 20;
  V[1] = 0;
end SVDF;

Thank you very much for your answer.

  • Index
  • » Users
  • » greghowe
  • » Profile
You are here: