Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CSTR with variable porosity #235

Closed
3 tasks done
jbreue16 opened this issue Jul 9, 2024 · 5 comments
Closed
3 tasks done

Add CSTR with variable porosity #235

jbreue16 opened this issue Jul 9, 2024 · 5 comments

Comments

@jbreue16
Copy link
Contributor

jbreue16 commented Jul 9, 2024

As per discussion in #211, we need to make porosity variable for the CSTR.

TODO

  • Create new unit operation CSTRVarPor based on the CSTR unit operation. This is described in the dev guide; please also leave a comment or make changes to the guide.
  • Adapt the interface: Change POROSITY to CONST_SOLID_VOLUME, which will be the constant solid volume of the tank. Porosity will be computed from that and not be exposed to the user anymore.
  • Recompute the current porosity from the liquid and solid volume in the residual and Jacobian implementation of the unit
@AntoniaBerger
Copy link
Collaborator

AntoniaBerger commented Jul 10, 2024

Do we want to consider that the inlet of a cstr also has somethinkg like "porosity".

For example, if we put sand and liquid in a cstr? Or is the porosity of cstr only depending on the change of the liquid volume?

@jbreue16
Copy link
Contributor Author

We can think of that in a second step, at first i would assume solid to be fixed and given by the user.

Iam not sure however if adding solid is actually done in practice, I dont think so.
Theres usually a fixed bed of particles thats usually expensive and is not pumped through the system but fixed in individual units.
Seems like a very special case to me and I'd wait and see if anybody actually wants to use that in cadet.

@AntoniaBerger
Copy link
Collaborator

AntoniaBerger commented Jul 11, 2024

In order to complite TODO 2 we distinguish between the state $V^{\ell}(t)$ and the parameter $V^{s} = const \in \mathbb{R}_{\geq 0}$.

Thus the equations for the CSTR change a little bit:
$$\frac{\mathrm{d}}{\mathrm{d}t} (V^{\ell} c^\ell_i) + V^{s} \sum_j d_j \sum_{m_{j,i}} \frac{\mathrm{d}}{\mathrm{d}t} (c^s_{j,i,m_{j,i}}) = F_{\text{in}} c^\ell_{\text{in},i} - F_{\text{out}} c^\ell_i + V^{\ell} f_{\text{react},i}^l\left( c^\ell \right)+V^{s}\sum_j d_j f_{\text{react},j,i}^s\left( c^\ell, c_j^s \right)$$

$$\frac{\mathrm{d}V^{\ell}}{\mathrm{d}t}= F_{\text{in}} - F_{\text{out}} - F_{\text{filter}}$$
Where the flowrates $F_{\text{in}} , F_{\text{out}} , F_{\text{filter}}$ are associated to state $V^{\ell}$.

I think, we would complicate the equation if we would write the first equation as a function of porosity: $$\varepsilon(t) = \frac{V^{l}(t)}{V^{l}(t) + V^{s}}.$$ As we would get an additional coupling of states through a product.

@jbreue16
Copy link
Contributor Author

you can already push a branch with your current changes. After youve done that, we can open a PR and colaborate better.

@jbreue16
Copy link
Contributor Author

Closed as per #245

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants