mutationpp / Mutationpp

The MUlticomponent Thermodynamic And Transport library for IONized gases in C++
GNU Lesser General Public License v3.0
109 stars 58 forks source link

customized state model #148

Closed CatarinaGarbacz closed 3 years ago

CatarinaGarbacz commented 3 years ago

@jbscoggi

hello JB,

we would like to have a state model that allows from TTv nonequilibrium, but frozen mixture. essentially something identical to ChemNonEqTTvStateModel.cpp but commenting out the lines in bold

        addTransferTerm(0, Factory::create("OmegaVT", mix));
        **addTransferTerm(0, Factory::create("OmegaCV", mix));
        addTransferTerm(0, Factory::create("OmegaCElec", mix));**

        // Terms only included when electrons are present
        if (m_thermo.hasElectrons()) {
            addTransferTerm(0, Factory::create("OmegaET", mix));
            **addTransferTerm(0, Factory::create("OmegaCE", mix));**
            addTransferTerm(0, Factory::create("OmegaI", mix));
        }

I have done this in my private branch, meaning, I created a file NonEqTTvStateModel.cpp that follows what I said. I would like now to push these changes - With mutation++ about to be linked with SU2 in the develop/master branch, we need the option of frozen mixture to be in the repo, so it's available when SU2 automatically clones Mpp.

The reason why I am posting this issue, it's because I am not sure if this method is OK with you since it is more of an easy approach, or if it's a "waste", in the sense that there's 2 files almost identical. As I am not a Mpp developer, so I am here to ask your feedback in what's the best way to do this without disrupting Mpp nice structure

thank you

jbscoggi commented 3 years ago

Hey @CatarinaGarbacz, does this mean you just want a mixture without a reaction mechanism? If so, there is no code change required, you can simply remove the reference to the mechanism in your mixture file.

CatarinaGarbacz commented 3 years ago

@jbscoggi that's great! makes sense, I will give it a try but should be fine. thanks!

CatarinaGarbacz commented 3 years ago

Hi @jbscoggi I was wondering... This way of doing things is not ideal, since a user won't know he/she can do that (deleting the reference of the mechanism in the mixture file)... and there's not really a way, that I can think of, to let them know. so I was wondering if there's a way to make this automatic and the user would simply need to set FROZEN_MIXTURE= YES on the input file of SU2.

that's why I thought about creating that new NonEqTTvStateModel, so

if frozen opt.setStateModel("NonEqTTv");

I understand why this last option is not ideal cause of what you said... so any thoughts?

jbscoggi commented 3 years ago

Hey @CatarinaGarbacz, you can actually do this already by using opt.setMechanism("none") instead of changing the state model. That should work but if not let me know.

jbscoggi commented 3 years ago

Hey @CatarinaGarbacz, can I close this issue?

CatarinaGarbacz commented 3 years ago

yes! solved

jbscoggi commented 3 years ago

great! thanks, closing.