Skip to content

Validation Carreau Yasuda Model - #1207

Open
sherin-joseph wants to merge 16 commits into
trixi-framework:mainfrom
sherin-joseph:validation-carreau-yasuda
Open

Validation Carreau Yasuda Model #1207
sherin-joseph wants to merge 16 commits into
trixi-framework:mainfrom
sherin-joseph:validation-carreau-yasuda

Conversation

@sherin-joseph

@sherin-joseph sherin-joseph commented May 21, 2026

Copy link
Copy Markdown
Contributor

Please note that this is more of a steady-profile preservation check than a full convergence-from-rest validation, because the default and high-resolution runs use analytical initial conditions. . For a stronger transient validation, we need to use initial_condition_mode = zero or newtonian and verify convergence of the velocity profile toward the analytical solution.

The relative L2 velocity-profile error remains below 3% for all tested Carreau-Yasuda indices at ny = 200. The largest error occurs for n = 0.25, the strongest shear-thinning case, while the Newtonian limit n = 1 is recovered with about 1.4% relative L2 error.

carreau_final_profiles

The reference Poiseuille validation from Section 3.1 of Coclite et al. (2020) is shown below for comparison.

image

@svchb

svchb commented May 21, 2026

Copy link
Copy Markdown
Collaborator

For validation cases we want to have the following structure:

  1. example file that is trixi_include'd into the validation_run file
  2. the validation run file contain some kind of error bounds
  3. Additionally a plot file to plot the results of the validation run.

So you just need to create this additional example file and figure out an error bound for the validation to get to that structure.

@codecov

codecov Bot commented May 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.50%. Comparing base (02fc220) to head (5a18c37).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1207   +/-   ##
=======================================
  Coverage   90.50%   90.50%           
=======================================
  Files         141      141           
  Lines       11409    11410    +1     
=======================================
+ Hits        10326    10327    +1     
  Misses       1083     1083           
Flag Coverage Δ
total 90.51% <100.00%> (+<0.01%) ⬆️
unit 77.76% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sherin-joseph
sherin-joseph force-pushed the validation-carreau-yasuda branch from 028501c to 0ec9cb8 Compare May 21, 2026 11:09
@sherin-joseph

Copy link
Copy Markdown
Contributor Author

@svchb
The PR now includes:

examples/fluid/poiseuille_carreau_2d.jl as the example file
validation/poiseuille_carreau_2d/validation_poiseuille_carreau_2d.jl as the validation runner using trixi_include
relative L2 error bounds in the validation runner
plot_carreau_comparison.jl for plotting the validation results

I hope this follows the expected structure now. Please let me know if any further changes or corrections are needed.

Thanks for the guidance!

@svchb svchb added the enhancement New feature or request label May 26, 2026

@efaulhaber efaulhaber left a comment

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.

I apologize for the long review turnaround. We have a lot of open PRs at the moment.

The results look very promising. Could you please also add the analytical solution in the plots to be able to get a better feeling of how accurate the results are?

Comment thread examples/fluid/poiseuille_carreau_2d.jl
Comment thread examples/fluid/poiseuille_carreau_2d.jl Outdated
Comment thread examples/fluid/poiseuille_carreau_2d.jl Outdated
Comment thread examples/fluid/poiseuille_carreau_2d.jl Outdated
Comment thread validation/poiseuille_carreau_2d/plot_carreau_comparison.jl Outdated
Comment thread validation/poiseuille_carreau_2d/README.md Outdated
Comment thread validation/poiseuille_carreau_2d/validation_poiseuille_carreau_2d.jl Outdated
Sherin Joseph added 2 commits July 15, 2026 16:54
	modified:   validation/poiseuille_carreau_2d/README.md
	new file:   validation/poiseuille_carreau_2d/analytical_solution.jl
	modified:   validation/poiseuille_carreau_2d/plot_carreau_comparison.jl
	modified:   validation/poiseuille_carreau_2d/validation_poiseuille_carreau_2d.jl
@sherin-joseph

Copy link
Copy Markdown
Contributor Author

Thanks for the detailed review. I added the analytical profiles to the plots. These figures show the transient relaxation from the Newtonian initial profile toward the Carreau-Yasuda analytical profiles. The n = 0.25 case is much slower to converge, so I am rerunning the remaining cases for a longer final time and will update the figures once those runs finish.
image
image

I apologize for the long review turnaround. We have a lot of open PRs at the moment.

The results look very promising. Could you please also add the analytical solution in the plots to be able to get a better feeling of how accurate the results are?

Sherin Joseph and others added 6 commits August 24, 2026 16:03
	modified:   examples/fluid/poiseuille_carreau_2d.jl
	modified:   src/schemes/fluid/viscosity.jl
	modified:   test/schemes/fluid/viscosity.jl
	modified:   validation/poiseuille_carreau_2d/README.md
	modified:   validation/poiseuille_carreau_2d/validation_poiseuille_carreau_2d.jl
	modified:   validation/poiseuille_carreau_2d/validation_poiseuille_carreau_2d.jl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants