Skip to content

Commit

Permalink
added specific volume as a property
Browse files Browse the repository at this point in the history
  • Loading branch information
ngomezve committed Jan 26, 2024
1 parent 0bfa9ad commit 4653fca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Gas.jl
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ function Base.getproperty(gas::Gas, sym::Symbol)
return P / (R * T)
elseif sym === :rho
return getproperty(gas, )
elseif sym ===
return 1 / getproperty(gas, )
elseif sym === :nu
return getproperty(gas, )
elseif sym === :X # Get mole fractions
Y = getfield(gas, :Y)
MW = spdict.MW
Expand Down
4 changes: 4 additions & 0 deletions src/Gas1D.jl
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ function Base.getproperty(gas::Gas1D, sym::Symbol)
return P / (R * T)
elseif sym === :rho
return getproperty(gas, )
elseif sym ===
return 1 / getproperty(gas, )
elseif sym === :nu
return getproperty(gas, )
else
return getfield(gas, sym)
end
Expand Down

0 comments on commit 4653fca

Please sign in to comment.