Merge lp://staging/~ctjacobs-multiphase/fluidity/ctjacobs-multiphase into lp://staging/fluidity

Proposed by Christian Jacobs
Status: Merged
Approved by: Christian Jacobs
Approved revision: 3460
Merged at revision: 3520
Proposed branch: lp://staging/~ctjacobs-multiphase/fluidity/ctjacobs-multiphase
Merge into: lp://staging/fluidity
Diff against target: 11791 lines (+10472/-504)
29 files modified
assemble/Momentum_CG.F90 (+35/-13)
assemble/Momentum_DG.F90 (+259/-78)
assemble/Momentum_Equation.F90 (+21/-4)
assemble/Multiphase.F90 (+307/-13)
manual/bibliography.bib (+21/-2)
manual/configuring_fluidity.tex (+45/-4)
manual/model_equations.tex (+20/-2)
schemas/fluidity_options.rnc (+5/-10)
schemas/fluidity_options.rng (+3/-14)
tests/Stokes_3d_busse_1a_p2p1/Makefile (+2/-3)
tests/Stokes_3d_busse_1a_p2p1/src/Busse_C1.msh (+5690/-0)
tests/mphase_divergence_free_velocity/mphase_divergence_free_velocity.xml (+3/-3)
tests/mphase_identical_velocities/Makefile (+5/-6)
tests/mphase_identical_velocities/mphase_identical_velocities.xml (+46/-26)
tests/mphase_identical_velocities/single_phase_results.vtu (+27/-0)
tests/mphase_identical_velocities/src/mphase_identical_velocities.msh (+1027/-0)
tests/mphase_identical_velocities_dg/Makefile (+17/-0)
tests/mphase_identical_velocities_dg/mphase_identical_velocities_dg.flml (+471/-0)
tests/mphase_identical_velocities_dg/mphase_identical_velocities_dg.xml (+73/-0)
tests/mphase_identical_velocities_dg/single_phase_results.vtu (+27/-0)
tests/mphase_identical_velocities_dg/src/mphase_identical_velocities_dg.geo (+16/-0)
tests/mphase_identical_velocities_dg/src/mphase_identical_velocities_dg.msh (+1399/-0)
tests/mphase_sedimentation/mphase_sedimentation.flml (+1/-1)
tests/mphase_sedimentation/mphase_sedimentation.xml (+77/-3)
tests/mphase_stokes_law/Makefile (+17/-0)
tests/mphase_stokes_law/mphase_stokes_law.flml (+683/-0)
tests/mphase_stokes_law/mphase_stokes_law.xml (+62/-0)
tests/mphase_stokes_law/src/mphase_stokes_law.geo (+19/-0)
tests/mphase_tephra_settling/mphase_tephra_settling.flml (+94/-322)
To merge this branch: bzr merge lp://staging/~ctjacobs-multiphase/fluidity/ctjacobs-multiphase
Reviewer Review Type Date Requested Status
Christian Jacobs Approve
Stephan Kramer Approve
Cian Wilson Approve
Review via email: mp+65971@code.staging.launchpad.net

Description of the change

Proposing merge of ctjacobs-multiphase branch revisions r3410 to r3445 (inclusive) into trunk.

All unit, short and medium tests passed at branch revision r3443 - I'm re-running the build queue now to include Cian's changes to vtktools.py (trunk r3504) and Tim's changes to configure (trunk r3505), just in case.

Summary of changes:
===================

- Extended Momentum_DG.F90 to handle multi-phase flows. bassi_rebay and compact_discontinuous_galerkin are the only viscosity schemes offered for multi-phase so far.

- Changed the form of the viscosity term from vfrac*div(T) to div(vfrac*T).

- Added multi-phase support for integrate_advection_by_parts in Momentum_CG.F90.

- Removed unused variables from Momentum_Equation.F90 and Momentum_DG.F90.

- Capped the non-linear approximation to the volume fraction that gets used in the momentum equation, rather than chopping bits off the actual PhaseVolumeFraction field.

- Added four new multi-phase test cases:

1) 'mphase_stokes_law' demonstrates that the particle phase's terminal velocity is the same as the one predicted by Stokes' law when using the fluid-particle drag term: http://amcg.ese.ic.ac.uk/~ctj10/images/mphase_stokes_law.png

2) 'mphase_identical_velocities_dg' checks that Momentum_Equation.F90 can correctly solve multiple sets of Navier-Stokes equations using a DG velocity discretisation.

3 & 4) 'mphase_mms_p1dgp2_br' and 'mphase_mms_p1dgp2_cdg' confirm that velocity converges at second order using the P1DG-P2 element pair with bassi_rebay and CDG respectively. However, like the other (single-phase) P1DG-P2 Navier-Stokes MMS test, pressure currently only converges at around first order. These have been added to the longtests directory and will be set from 'special' to 'long' after the merge.

- In the mphase_tephra_settling test case: Updated the tephra PhaseVolumeFraction initial condition, and divided each phase's Source term by its Density (to cancel out the multiplication by density_gi in the Source term assembly). Also enabled mesh adaptivity: http://amcg.ese.ic.ac.uk/~ctj10/movies/mphase_tephra_settling_adaptive.avi

- In the mphase_identical_velocities and mphase_identical_velocities_dg test cases: Loading the .vtu files using vtktools to check that the velocities are the same as in the single phase case. Adding the .msh file for mphase_identical_velocities so the results do not vary between gmsh versions.

- In the mphase_sedimentation test case: Using vtktools to make the mphase_sedimentation test more thorough. The test now checks the PhaseVolumeFraction values in the lower, middle and upper third of the domain. Also, extended the final_time to 3.0.

- In the mphase_divergence_free_velocity test case: Tightened test tolerances (the test now checks if \sum{div(vfrac*u)} is less than 1e-10).

Note: This merge will contain Cian's fix (r3497 of branch lp:~fluidity-core/fluidity/parallel_periodic_adaptive) for the Stokes_3d_busse_1a_p2p1 failure caused by the gmsh issue on buildbot.

To post a comment you must log in.
3446. By Christian Jacobs

Merging trunk revisions (from r3506 to r3510 inclusive) into branch.

Revision history for this message
Cian Wilson (cwilson) wrote :

Looks good to me.

Only one small fix I'd suggest. In the calls to construct_momentum_interface_dg and construct_momentum_element_dg in Momentum_DG.F90 you shouldn't add extra required arguments (in this case nvfrac) after optional arguments (ib_min_grad etc.). Optional arguments should be the last things in the call list.

review: Needs Fixing
3447. By Christian Jacobs

All arguments to 'construct_momentum_element_dg' have been made non-Optional unless they are passed in as Optional in 'construct_momentum_dg', since 'construct_momentum_element_dg' is only called from one place.

Similar changes have been made to 'construct_momentum_interface_dg' except for those arguments that are only needed for the "if(primal)" branch of code.

Revision history for this message
Cian Wilson (cwilson) wrote :

I'm happy with that pending a green light on buildbot for the latest changes.

review: Approve
3448. By Christian Jacobs

Surprised this wasn't picked up by the tests...was using ele_ngi instead of face_ngi while being clever with the 'coefficient_detwei' stuff in the Bassi & Rebay term. Now fixed.

3449. By Christian Jacobs

Merging trunk revisions (from r3511 to r3515 inclusive) into branch.

Revision history for this message
Stephan Kramer (s-kramer) wrote :

Same here. Looks good to me. Ready to be merged. It would be good if we could get the trunk green first though, as at the moment it's a little unclear whether there are any further hidden issues with medium tests on the trunk.

review: Approve
3450. By Christian Jacobs

Merging trunk revisions (from r3516 to r3518 inclusive) into branch.

3451. By Christian Jacobs

Merging trunk revision r3519 into branch.

Revision history for this message
Christian Jacobs (ctjacobs) wrote :

With all the trunk and branch failures from medium test timeouts on buildbot, I'm going to wait until the problem is fixed before going ahead with the merge. In the meantime, commits that follow will be included in a future merge proposal.

3452. By Christian Jacobs

- Added documentation on the multiphase model to the Fluidity manual.

3453. By Christian Jacobs

- Adding the "particle_diameter" parameter to the "multiphase_properties" section of the schema. This is needed for the fluid-particle drag term.

3454. By Christian Jacobs

- Implemented the fluid-particle drag term in Multiphase.F90. See the manual for instructions on how to use.

Note that the assembly of this term happens *outside* of construct_momentum_cg/dg, and adds the contribution onto mom_rhs. This is to avoid significantly cluttering up the code. Otherwise, the whole state array would be passed into Momentum_CG/DG.F90 and multiple fields from both the fluid and particle phase(s) would need to be passed around.

3455. By Christian Jacobs

- Changed the mphase_stokes_law test case to use the new fluid-particle drag term implementation.

3456. By Christian Jacobs

- Changed the mphase_tephra_settling test case to use the new fluid-particle drag term implementation.

3457. By Christian Jacobs

- Updated the mphase_tephra_settling test case to use a tephra inflow boundary condition at the top (rather than using a prescribed layer of tephra), increased the timestep to 0.01, removed mesh_adaptivity for now, and set the discretisation options to use P1DG-P2.

3458. By Christian Jacobs

Updated comments in Multiphase.F90.

3459. By Christian Jacobs

Seems the reference manager mangled the bibliography - now fixed. Also, fixed a multiply defined reference.

3460. By Christian Jacobs

Updated drag term equations in the manual.

Revision history for this message
Christian Jacobs (ctjacobs) wrote :

The trunk is now green on buildbot. The branch queue also passes all unit, short and medium tests:

Unit tests:
    Passes: 20756
    Warnings: 0
    Failures: 0
Short tests:
    Passes: 956
    Failures: 0
    Warnings: 0
Medium tests:
    Passes: 869
    Failures: 0
    Warnings: 0
Medium Zoltan tests:
    Passes: 22
    Failures: 0
    Warnings: 0

Going ahead with the merge...

review: Approve
Revision history for this message
Cian Wilson (cwilson) wrote :

But doesn't this now have a load of commits that weren't in the original merge proposal?

Revision history for this message
Cian Wilson (cwilson) wrote :

Ignore this, Christian has explained that he's only doing a merge up to the commits before yesterday's changes.

> But doesn't this now have a load of commits that weren't in the original merge
> proposal?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.