Skip to content

Refactor two fluid model#201

Open
szekedidavid wants to merge 35 commits into
develfrom
refactor-two-fluid-model
Open

Refactor two fluid model#201
szekedidavid wants to merge 35 commits into
develfrom
refactor-two-fluid-model

Conversation

@szekedidavid
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Member

@spossann spossann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just the first part of my review.

Comment thread src/struphy/io/options.py Outdated
Comment thread src/struphy/io/options.py Outdated
Comment thread src/struphy/utils/utils.py Outdated
Comment thread split_models.py Outdated
Comment thread src/struphy/propagators/propagators_fields.py Outdated
Comment on lines +8068 to +8069
nu: float | None = None
nu_e: float | None = None
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make clear in which units the viscosity is passed here. For this, we can add a new attribute in struphy.physics.physics.Units, like

self._nu = A_bulk * con.mH * self.n * self.x * self.v

See formula (2.17) of the master thesis. In this way the units of the viscosity will be auto-computed and can be queried by the user.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added to units. Do I access it via passing sim.units through Options?

Comment thread src/struphy/propagators/propagators_fields.py Outdated
Comment thread src/struphy/propagators/propagators_fields.py Outdated
Comment thread src/struphy/propagators/propagators_fields.py Outdated
Comment thread src/struphy/propagators/propagators_fields.py Outdated
@spossann
Copy link
Copy Markdown
Member

@szekedidavid Can you put the construction of the V0-Derham complex for lifting in the Derham class already? In that way I could start from that, which would be nice.

@szekedidavid
Copy link
Copy Markdown
Contributor Author

@szekedidavid Can you put the construction of the V0-Derham complex for lifting in the Derham class already? In that way I could start from that, which would be nice.

Done! I also removed the boundary condition flags in the propagator.
Let me know when you finished the notebook.

@spossann
Copy link
Copy Markdown
Member

@szekedidavid Can you put the construction of the V0-Derham complex for lifting in the Derham class already? In that way I could start from that, which would be nice.

Done! I also removed the boundary condition flags in the propagator. Let me know when you finished the notebook.

Thanks! Will let you know asap.

@spossann
Copy link
Copy Markdown
Member

Hi @szekedidavid - a new notebook is available, see this comment: #212 (comment)

@szekedidavid szekedidavid force-pushed the refactor-two-fluid-model branch from caed772 to 61b2955 Compare April 14, 2026 17:24
@szekedidavid
Copy link
Copy Markdown
Contributor Author

Hi @spossann , I managed to make lifting work in 1D using the FEECVariable implementation. Also expanded it to 2D and added the full solution (propagator is much, much cleaner now). The 2D lifting test case is not yet working, but it could entirely be a stabilization parameter or time stepping issue (unconstrained tangential velocity DoFs blow up in Hdiv).

@spossann
Copy link
Copy Markdown
Member

spossann commented May 5, 2026

Hi @szekedidavid - how are you? I managed to merge the branch with the current devel, which featured some re-factoring of how the propagators are stored (now in separate files). I hope that all your major changes are still there, please have a look.

Important (!!): I could not get the changes you made in struphy-parameter-files, you might have them only locally. you could push them to the repo struphy-parameter-files or just copy them to a safe place. Do not (!) pull this updated branch yet - the ensuing merge might delete your notebook files and we might lose your jupyter notebooks from the submodule struphy-parameter-files. Make sure you copy those files first to a safe location. We can then add them to the folder examples in the struphy repo.

Please contact me in case of uncertainty.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants