jegerz / GC-Column

this code simulates how components are seperated in a column
0 stars 2 forks source link

Fix movement of Air and Components #1

Open strider2112 opened 4 months ago

strider2112 commented 4 months ago

Here's the steps I think, pseudo logic:

  1. Make the column a certain length, eg. 10m
  2. Make the air peak a certain velocity, eg. 1 m/s
  3. Calculate the time required for the air peak to animate from beginning to end of column (10 seconds, this is the holdup time)
  4. Using solubility, calculate the distance each component will make it in 10 seconds. Lc = L / (1 + k)
  5. Animate each component making it that far in the same holdup time
jegerz commented 4 months ago

A little introduction to the code You know, I think the most difficult part of this pseudo logic is animation. The Version 00 is drawing a vector vs its indices. On the other hands, the size of the vector is equal to the plate number. Under any circumstances will be the vector size equal to the plate number because in each time frame we are drawing the status of equilibria About step1: As the first graph is illustrating something in the column, so the x axis should be migrated distance and we scale it between 0 and L(the length in cm or M inserted by user). Step 2: This is quite straightforward and can be easily implemented with some elementary math commands. Step 3: I think this one is the most challenging step.

  1. Every iteration is a frame of the movie. It represents an equilibria
  2. I have to pause the frame for a fraction of second until the next frame begins.
  3. air peak DT = (Holdup_Time)/Plate_number/(1+k)
jegerz commented 4 months ago

Step 4: Because we have already solubility in our equations, the current simulation gives the correct position of the other components compared to the air peak in the column. I think we have already implemented this step.