Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Cylinder tank simulation

Cylinder tank simulation 3 years 7 months ago #10755

  • jds
  • jds's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 120
  • Thank you received: 2
  • Karma: 0
Hello,
In the simulation tools there's a cylinder tank simulation but this is for a vertical tank.

I'm curious if anybody has any experience in simulating a horizontal tank? I'm trying to get the maths done, but I think my maths knowledge has been gone too far away ...
The administrator has disabled public write access.

Cylinder tank simulation 3 years 7 months ago #10757

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3178
  • Thank you received: 502
  • Karma: 133
Hi jds,

With pythagoras theorem I get that the change in tank level in one scan time is
F * t / (2 * l * sqrt(2 * r * L - pow(L, 2)))
where

F is in flow minus out flow
l is cylinder length
r is cylinder radius
L is tank level
t is scantime

Note that this is infinity when L = 0 and L = 2r.

/Claes
The administrator has disabled public write access.
The following user(s) said Thank You: jds

Cylinder tank simulation 3 years 7 months ago #10759

  • jds
  • jds's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 120
  • Thank you received: 2
  • Karma: 0
thanks again Claes!
F * t / (2 * l * sqrt(2 * r * L - pow(L, 2)))
Is it correct that the first multiply needs to be an equal sign?
Can I put this formula in one way or an other in a Carithm to distilate the level out of it?
The administrator has disabled public write access.

Cylinder tank simulation 3 years 7 months ago #10760

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3178
  • Thank you received: 502
  • Karma: 133
No, this is the change in level so the level is

L = L + F * t / (2 * l ...

In a CArithm it would be something like
OA1 += A1 * A2 / (2 * A3 * sqrt( 2 * A4 * OA1 - pow(OA1, 2)));
where you connect A1 to the net flow, A2 to a ScanTime object, and insert constants for cylinder length in A3 and radius in A4.
Level on output OA1.

You first have to test that L or L - 2r is not close to zero cause this will give an invalid value.

/Claes
The administrator has disabled public write access.
The following user(s) said Thank You: jds

Cylinder tank simulation 3 years 6 months ago #10761

  • jds
  • jds's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 120
  • Thank you received: 2
  • Karma: 0
Claes,

worked like a charm B)

Thanks!
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 8.837 seconds