If there is no heat transfer to or from the cylinder, thus making the case adiabatic. Then
The change of internal energy within the cylinder is equal to the product of the stagnation enthalpy of the hydrogen injected times the mass of the hydrogen.
Assuming no hydrogen initially in the cylinder and no mass change of ammonia-
M mass
H specific enthalppy
U specific internal energy
V Specific volume
Ho stagnation enthalpy of injected Hydrogen
subscripts
a NH3
b H2
Energy equation is
Ma(Ua- Ua initial)+ MbUb = Mb(Hob)
Ua and Ub are the final spec. internal energy of the ammonia and hydrogen.
Treating Hydrogen as perfect gas and const spec. heats
Ma(Ua-Ua initial) =Mb(Tob- T )
Where T is final temp of mixture
Volume, Mb and Ma should be known.
Ua -Ua initial = Mb/Ma (Tob -T)
First--Assume no condensation --all single phase gas
Can equation based on Daltons Law of Partial pressures be solved? If solveable, STOP
Second-- Assuming condensation
Itterating on a final temp, T. - Calculate the spec. interal energy of the two phase ammonia as follows
x = quality of two phase ammonia
Ua= Uf +xUfg Va = Vf+xVfg Ua= Uf + (Va-Vf)*Ufg/Vfg
NOw energy equation
Ua -Ua initial = Mb/Ma (Tob -T)
becomes
Uf + (Va-Vf)*Ufg/Vfg -Ua initial = Mb/Ma (Tob -T) **
Ua initial, known
Vf, Ufg, Vfg Functions of T
Solve equation ** for T