Skip to content

Commit

Permalink
Merge pull request #17 from slimgroup/quickfix
Browse files Browse the repository at this point in the history
quickfix according to jutulexamples
  • Loading branch information
ziyiyin97 authored Mar 23, 2023
2 parents 24f7269 + 1531376 commit 5627dc6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "JutulDarcyRules"
uuid = "41f0c4f5-9bdd-4ef1-8c3a-d454dff2d562"
authors = ["Ziyi Yin <ziyi.yin@gatech.edu>"]
version = "0.2.3"
version = "0.2.4"

This comment has been minimized.

Copy link
@ziyiyin97

ziyiyin97 Mar 23, 2023

Author Member

[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Expand All @@ -15,8 +15,8 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
[compat]
ChainRulesCore = "1"
Flux = "0.12, 0.13"
Jutul = "0.2.2"
JutulDarcy = "0.2.1"
Jutul = "=0.2.2"
JutulDarcy = "=0.2.1"
Optim = "1"
julia = "1"

Expand Down
1 change: 1 addition & 0 deletions src/FlowRules/Types/type_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ function simple_model(M::jutulModel{D, T}; ρCO2::T=T(ρCO2), ρH2O::T=T(ρH2O))
g = CartesianMesh(M.n, M.d .* M.n)
G = discretized_domain_tpfv_flow(tpfv_geometry(g), porosity = M.ϕ, permeability = M.K)
model = SimulationModel(G, sys, output_level = :all)
model.primary_variables[:Pressure] = JutulDarcy.Pressure(minimum = -Inf, max_rel = nothing)
ρ = ConstantCompressibilityDensities(p_ref = 100*bar, density_ref = [ρCO2, ρH2O], compressibility = [1e-4/bar, 1e-6/bar])
replace_variables!(model, PhaseMassDensities = ρ)
replace_variables!(model, RelativePermeabilities = BrooksCoreyRelPerm(sys, [2.0, 2.0], [0.1, 0.1], 1.0))
Expand Down
2 changes: 1 addition & 1 deletion test/test_gradient.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ g1 = gradient(()->misfit(x0, ϕ, q1, states1), Flux.params(x0, ϕ))

@testset "Taylor-series gradient test of simple jutulModeling" begin
grad_test(x0->misfit(x0, ϕ, q1, states1), x0, dx/1.5, g1[x0])
grad_test->misfit(x0, ϕ, q1, states1), ϕ, dϕ/1e2, g1[ϕ])
grad_test->misfit(x0, ϕ, q1, states1), ϕ, dϕ*0.0023, g1[ϕ])
end

states2 = S(x, q2)
Expand Down

1 comment on commit 5627dc6

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/80156

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.4 -m "<description of version>" 5627dc6b325548b2cb3f1b3ce6b0c9df389a19e4
git push origin v0.2.4

Please sign in to comment.