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
  • » bboymq
  • » Profile

Posts

Posts

First, I want to thank you.

But, What a pity! Your solve doesn't work current/sad

oh, who can help me to solve my problem .... ? Hurry up !!!  T___T

Hello everybody, may you help me, I have one problem ...
I have a function, example y = x^2, and two points and there positions are A(-1,3) and B(2, -2). I want to plot all, I want them have to appear in only a chart, both function and two points. Anyone can help me?

Thanks a lot ...

Oh, Rolf, I can't use any word to my show deep gratitude to you. You're very great !!!

rolffankhauser wrote:

As you can see, you have simulated 1/4 from an ellipse. So you have to simulate 4 times longer or 5 times longer to be sure that you simulate more than 360 degrees.

Thanks Rolf, you can guide me concretely because I'm a beginner, How to simulate, I dont know how to simulate 4 times longer or more.

oh, thanks Rolf once again for guiding me,

You have got a perfect ellipse and that's correct, but, my program can't show a perfect ellipse, only a part of ellipse, I will show you my result:

http://c.upanh.com/upload/7/121/730.11332636_1_1.jpg

Once again, may you show to me your "simulate code", how to get a perfect ellipse?

Thanks Rolf

bboymq wrote:

I have a nonlinear Differential Equation for an Orbit of a Satellite
Consider the problem of an orbit of satellite, whose position and velocity are obtained as the solution of the following state equation:

x'1(t) = x3(t)
x'2(t) = x4(t)
x'3(t) = -GMEx1(t) / (x21(t) + x22(t))3/2
x'4(t) = -GMEx2(t) / (x21(t) + x22(t))3/2

where G = 6.672 x 10-11 Nm2/kg2 is the gravitational constant, and ME =  6.97 x 1024 kg is the mass of the earth. Note (x1, x2) and (x3, x4) denote the position and velocity, respectively, of the satellite on the plane having the earth at its origin.

How can I plot them in openModelica? I have tried, but I can't plot them.

Thanks a lot.

Thanks Rolf, can you check my program current/big_smile

(x10,x20) = (4.223 × 107, 0)[m]and (x30,x40) = (v10,v20) =
(0, 3071)[m/s].

Here is the code in modelica

model A
  constant Real G = 6.672e-11;
  constant Real ME = 5.97e24;
  Real x1(start = 4.223e7);
  Real x2(start = 0);
  Real x3(start = 0);
  Real x4(start = 3071);
equation
  der(x1) = x3;
  der(x2) = x4;
  der(x3) = -G * ME * x1 / ((x1^2 + x2^2)^(3/2));
  der(x4) = -G * ME * x2 / ((x1^2 + x2^2)^(3/2));
end A;

Is this program wrong?

Thanks a lot.

I have a nonlinear Differential Equation for an Orbit of a Satellite
Consider the problem of an orbit of satellite, whose position and velocity are obtained as the solution of the following state equation:

x'1(t) = x3(t)
x'2(t) = x4(t)
x'3(t) = -GMEx1(t) / (x21(t) + x22(t))3/2
x'4(t) = -GMEx2(t) / (x21(t) + x22(t))3/2

where G = 6.672 x 10-11 Nm2/kg2 is the gravitational constant, and ME =  6.97 x 1024 kg is the mass of the earth. Note (x1, x2) and (x3, x4) denote the position and velocity, respectively, of the satellite on the plane having the earth at its origin.

How can I plot them in openModelica? I have tried, but I can't plot them.

Thanks a lot.

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