Arrhenius.jl icon indicating copy to clipboard operation
Arrhenius.jl copied to clipboard

Set up documentation

Open jiweiqi opened this issue 3 years ago • 17 comments

https://sparkbox.com/foundry/github_wiki_tutorial_for_technical_wiki_documentation

jiweiqi avatar Apr 23 '21 18:04 jiweiqi

Following https://juliadocs.github.io/Documenter.jl/stable/man/guide/

jiweiqi avatar Apr 30 '21 04:04 jiweiqi

Now at https://deng-mit.github.io/Arrhenius.jl/dev/ Reference:

  • https://github.com/JuliaPOMDP/POMDPs.jl/blob/master/docs/src/index.md

jiweiqi avatar Apr 30 '21 17:04 jiweiqi

@RSuryaNarayan You can start from this example to get familiar with Arrhenius.jl

jiweiqi avatar May 07 '21 01:05 jiweiqi

Sure @jiweiqi ! Shall go through.

RSuryaNarayan avatar May 07 '21 03:05 RSuryaNarayan

Shall I send a PR for this: https://github.com/RSuryaNarayan/Arrhenius.jl/blob/main/docs/src/get_started.md

RSuryaNarayan avatar May 09 '21 17:05 RSuryaNarayan

@RSuryaNarayan I think it is a good practice to send a PR and get familiar with it.

jiweiqi avatar May 09 '21 18:05 jiweiqi

Sure @jiweiqi I shall send the PR right away

RSuryaNarayan avatar May 09 '21 18:05 RSuryaNarayan

@RSuryaNarayan A very minor remind, you may forget to specify the language for the following code block

@inbounds function dudt!(du, u, p, t)
    T = u[end]
    Y = @view(u[1:ns])
    mean_MW = 1. / dot(Y, 1 ./ gas.MW)
    ρ_mass = P / R / T * mean_MW
    X = Y2X(gas, Y, mean_MW)
    C = Y2C(gas, Y, ρ_mass)
    cp_mole, cp_mass = get_cp(gas, T, X, mean_MW)
    h_mole = get_H(gas, T, Y, X)
    S0 = get_S(gas, T, P, X)
    wdot = wdot_func(gas.reaction, T, C, S0, h_mole)
    Ydot = wdot / ρ_mass .* gas.MW
    Tdot = -dot(h_mole, wdot) / ρ_mass / cp_mass
    du .= vcat(Ydot, Tdot)
end

Without specifying language,

@inbounds function dudt!(du, u, p, t)
    T = u[end]
    Y = @view(u[1:ns])
    mean_MW = 1. / dot(Y, 1 ./ gas.MW)
    ρ_mass = P / R / T * mean_MW
    X = Y2X(gas, Y, mean_MW)
    C = Y2C(gas, Y, ρ_mass)
    cp_mole, cp_mass = get_cp(gas, T, X, mean_MW)
    h_mole = get_H(gas, T, Y, X)
    S0 = get_S(gas, T, P, X)
    wdot = wdot_func(gas.reaction, T, C, S0, h_mole)
    Ydot = wdot / ρ_mass .* gas.MW
    Tdot = -dot(h_mole, wdot) / ρ_mass / cp_mass
    du .= vcat(Ydot, Tdot)
end

jiweiqi avatar May 09 '21 18:05 jiweiqi

@RSuryaNarayan BTW, it seems that .svg can not be correctly displayed on the website. You may try .png next time.

jiweiqi avatar May 09 '21 18:05 jiweiqi

Ah sorry for these bugs @jiweiqi shall correct them next time

RSuryaNarayan avatar May 09 '21 18:05 RSuryaNarayan

@jiweiqi the PNG doesn't render in the preview of the markdown for some reason. I have committed it nonetheless. Pls check the new PR

RSuryaNarayan avatar May 09 '21 19:05 RSuryaNarayan

I think the PNG file generated has something wrong. You can see an example here https://github.com/DENG-MIT/Arrhenius.jl/blob/main/docs/src/figures/schem.png.

jiweiqi avatar May 09 '21 19:05 jiweiqi

Aha no @jiweiqi that is not the problem. I meant the PNG file itself doesn't render as an image after I upload it.

RSuryaNarayan avatar May 09 '21 19:05 RSuryaNarayan

Oh, it is alright. We can fix it later. Can you show me the code you used to save the plot to a file in Julia.

jiweiqi avatar May 09 '21 19:05 jiweiqi

I was using this one png(pltsum, "JP10_pyrolysis.png"). This should give a png file. It seems the file you uploaded is still in svg format.

jiweiqi avatar May 09 '21 19:05 jiweiqi

@jiweiqi I seem to have used the right format now. It still doesn't render ryt?

RSuryaNarayan avatar May 09 '21 19:05 RSuryaNarayan

@RSuryaNarayan I just fixed it by changing the file path as ![](./figures/JP10.png).

jiweiqi avatar May 09 '21 19:05 jiweiqi