All Downloads are FREE. Search and download functionalities are using the official Maven repository.

termo.eos.alpha.commonaAlphaEquationsImplementation.StryjekAndVera Maven / Gradle / Ivy

Go to download

Thermodynamics properties and equilibria calculations for chemical engineering.

There is a newer version: 3.5
Show newest version


package termo.eos.alpha.commonaAlphaEquationsImplementation;

import termo.component.Compound;
import termo.eos.alpha.AlphaNames;
import termo.eos.alpha.CommonAlphaEquation;

/**
 *
 * @author Hugo
 */
public class StryjekAndVera extends CommonAlphaEquation {
    public StryjekAndVera(){
	setName(AlphaNames.StryjekAndVera);
	setR1(0.378893);
        setR2(1.4897153);
        setR3(-0.17131848);
        setR4(0.0196554);
    }

    @Override
    public String getEquation() {
        StringBuilder b = new StringBuilder();
        b.append("\\alpha(T) = \\left[ ");
        b.append("1+ m \\left(1-\\sqrt{T_r}\\right) ");
        if(x != 0 ){
            b.append("-k_1 (1-T_r)(0.7-T_r)");
        }
        
        b.append("\\right]^2  ");
        b.append("\\\\");
        b.append(m());
        return b.toString();                
    }

  
    
    
    
    @Override
    public void setParameter(double value, Compound component, int index){
        if(index ==0){
            component.setK_StryjekAndVera(value);
        }
        
    }
    
    
    @Override
    public double getParameter(Compound component, int index){
        if(index ==0){
            return component.getK_StryjekAndVera();
        }else{
            return 0;
        }
    }
    

    @Override
    public int numberOfParameters() {
        return 1;
    }

	@Override
	public String getParameterName(int index) {
		if(index==0){
			return "A";
		}else{return null;}
	}

    }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy