lp:~avire/fluidity/fix-absorption-cg-bug
- Get this branch:
- bzr branch lp:~avire/fluidity/fix-absorption-cg-bug
Branch merges
- Brendan Tollit: Approve
- Stephan Kramer: Pending requested
-
Diff: 1073 lines (+1009/-5)6 files modifiedassemble/Momentum_CG.F90 (+5/-5)
tests/test_source_absorption/Makefile (+7/-0)
tests/test_source_absorption/src/fluid_mesh.geo (+36/-0)
tests/test_source_absorption/test_no_source_absorption.flml (+421/-0)
tests/test_source_absorption/test_source_absorption.flml (+491/-0)
tests/test_source_absorption/test_source_absorption.xml (+49/-0)
Branch information
Recent revisions
- 3889. By Axelle Vire
-
Fix the bug https:/
/bugs.launchpad .net/fluidity/ +bug/897358 and test it.
The bug was a missing factor dt in the absorption term when using cg and including the absorption in the pressure correction.
The test is a 3d box with an initial vertical velocity equal to 0.5 and discretised with P1P1.
The time step is tiny (1e-5) and only 4 time steps are performed (adapt at the 2nd timestep).Two cases are run:
- test_no_
source_ absorption. flml, where neither an absorption nor a source is used.
- test_source_absorption. flml, where both an absorption and a source term of same magnitude are added as python diagnostic fields. With the bug fixed, the velocities remain at approximately 0.5.
Without the bug fixed, the case with absorption blows up (given the tiny timestep), see below:test_source_
absorption: Assigning ElapsedTime_no = 4e-05
test_source_absorption: Assigning umin_no = [ 0.5 0.5 0.49999999 0.49999999]
test_source_absorption: Assigning umax_no = [ 0.5 0.5 0.5 0.5]
test_source_absorption: Assigning ElapsedTime = 4e-05
test_source_absorption: Assigning umin = [ 5.00000000e-01 4.99999751e-01 1.79971486e-03 2.23209464e+08]
test_source_absorption: Assigning umax = [ 5.00000000e-01 5.00013040e-01 4.62493573e+01 7.31697047e+16] - 3888. By Patrick Farrell
-
Cian pointed out in lp:904816 that running the Burgers equation and
shallow water adjoint tests modifies some files that exist in bzr.
This commit should hopefully fix this. The issue is very minor (utf8
vs. utf-8 in the header of XML files, and minor variations in gmsh
versions). - 3886. By Jon Hill
-
Adding a try block around the import of scipy in fluidity state_types.py. This allows use of the majority of state_types functionality without scipy being installed, which is useful for HECToR
- 3885. By Brendan Tollit
-
Relax two tolerances (1.0e-09 to 2.0e-09) from a previous merge that seems to affect the i386 builds
for the 3D cases of these tests.No idea why this is a problem for 3D (and not 1D or 2D) and for i386 and not gcc.
- 3884. By Rhodri Davies
-
Some string continuation fixes which will hopefully placate the cx1 build. Also removed unused variable ncars from populate state.
- 3883. By Rhodri Davies
-
Merging Stokes Options Check branch into trunk. Thanks to skramer for review.
Happy New Year to all!
- 3882. By Brendan Tollit
-
This merge will add a procedure to be able to have non zero pressure Dirichlet
boundary conditions when using a CV discretisation for pressure. As for the CG
pressure BCs the integrals are included for both weak and strong Dirichlet.
For multiphase the phase volume fraction is included via a FE spatial
interpolation, akin to their inclusion in interior domain terms.Code Additions:
- assemble/
Pressure_ Dirichlet_ BCS_CV. F90. Adds the BC integrals via forming
the same local matrix as the weak velocity BCs but uses it transposed,
which is similar to pressure CG version(s).Code Changes:
- assemble/
Momentum_ Equation. F90. If cv_pressure calls the above routine
after assembling the main momentum equation terms.- assemble/
Makefile. in. Update for new file/module (using .o rather than .F90
as spotted by Cian)- assemble/
Makefile. dependencies. Update for new file/module. Test Cases Added:
- tests/darcy_
p0p1cv_ pressBCinlet. Simple channel flow model using darcy
flow with a pressure gradient using p0p1cv for 1,2 and 3d. Analytic
and very fast.- tests/darcy_
p0p1cv_ pressBCinlet_ 1solidphase. Same as above but with an
extra phase to represent the porous media for darcy flow. Analytic
and very fast.- tests/darcy_
p0p1cv_ pressBCinlet_ rotated_ domain. Similar to the above
but with a rotated domain as the pressure BCs have a normal component
so worth checking non axis aligned integrals. Analytic and very fast.- tests/darcy_
p0p1_test_ cty_cv_ pressBCinlet. Similar to above but with
CG pressure and CV continuity. This is added as not many CG pressure
BC test cases appear to exist. Analytic and very fast.- tests/darcy_
p0p1_test_ cty_cv_ pressBCinlet_ rotated_ domain. Same as
above but rotated. Analytic and very fast.- tests/darcy_
p0p1_test_ cty_cv_ velBCinlet. Similar to above but with
weak velocity BC instead. Just to test a combination of two previously
merged branches and the test case is very similar to above. - 3881. By Brendan Tollit
-
This merge will add the capability for the enforce discrete property solenoidal projection when
the lagrange multiplier is CG to test the divergence of the interpolated field with the CV dual.
This is akin to what was added for the velocity-pressure solve previously via this branch.
This adds an option to the schema, commenting that this will make the matrix non symmetric.There is also a small correction to an addition of the known velocity divergence to the projection
rhs to use ctp_m rather than ct_m (in this solenoidal projection routine).This is tested via the solenoidal unittest, with an extra case added to check for CV divergence.
Non used code was also removed from here.
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:fluidity