function f=build_fluid(paths,name) v=jsondecode(fileread(fullfile(paths.inputs,['eos-' name '.json']))); f=struct('name',name,'source_url',v.source_url,'source_sha256',v.source_sha256, ... 'EOS',v.EOS,'anc',v.ANCILLARIES,'Tc',v.EOS.STATES.reducing.T, ... 'rhoc',v.EOS.STATES.reducing.rhomolar*v.EOS.molar_mass,'Pc',v.EOS.STATES.reducing.p, ... 'R',v.EOS.gas_constant/v.EOS.molar_mass,'Mmol',v.EOS.molar_mass, ... 'Tmin',v.EOS.Ttriple,'Tmax',v.EOS.T_max,'pmax',v.EOS.p_max); if ~iscell(f.EOS.alpha0),f.EOS.alpha0=num2cell(f.EOS.alpha0);end if ~iscell(f.EOS.alphar),f.EOS.alphar=num2cell(f.EOS.alphar);end end