simphony / simphony-openfoam

The implementation of the SimPhoNy OpenFOAM -wrappers.
GNU General Public License v2.0
2 stars 0 forks source link

Internal wrapper: Modifications of input values in poiseuille example not considered in simulation run #57

Closed TobiasRasp closed 8 years ago

TobiasRasp commented 8 years ago

Using the internal wrapper, interactive parameter settings e.g. via wrapper.SP[CUBA.NUMBER_OF_TIME_STEPS] or via wrapper.SP[CUBA.DYNAMIC_VISCOSITY] in the poiseuille example are not reflected in the respective run files controlDict and transportProperties. Instead some static values seem to be used independent of what is given in the example.

For the IO control wrapper everything works fine!

khiltunen commented 8 years ago

@jmarcelogimenez can you look at this. I made a quick test and add the following printing sentences to the end of the interface function modifyNumerics

Foam::Info<< "controlDict.endTime " << controlDict.lookup("endTime") <<Foam::endl; Foam::Info<< "runTimes[name].endTime " << ((runTimes[name])).endTime() <<Foam::endl; Foam::Info<< "runTimes[name].controlDict().lookup(endTime) " << ((runTimes[name])).controlDict().lookup("endTime") <<Foam::endl;

which gives

controlDict.endTime 1(1000) runTimes[name].endTime endTime [0 0 1 0 0 0 0] 1 runTimes[name].controlDict().lookup(endTime) 1(1000)

I suppose that the solver gets now value 1 instead of 1000 for the endTime

jmarcelogimenez commented 8 years ago

Bug solved in branch #issue57.

When you confirm that everything is OK and do merge, I will create a new branch to migrate to OpenFOAM 2.4

khiltunen commented 8 years ago

@jmarcelogimenez. I tested and seems to work now.

jmarcelogimenez commented 8 years ago

Ok, If there is not any objection, I'll merge

TobiasRasp commented 8 years ago

Time control handling works fine now! But as far as I see, the values of CUBA.DENSITY and CUBA.DYNAMIC_VISCOSITY that can be set e.g. in the poiseuille example are not handed over to the OpenFoam solver. Instead, the default value for nu from the template in foam_internalwrapper/foam_dicts.py (line 42) is used, which is zero. Please correct me from wrong, if this is not true, but I couldn't find a viscosity treatment in the internal wrapper code.

jmarcelogimenez commented 8 years ago

Currently is a pending task for internal interface. But it will be developed directly over the branch migration_OF24.

khiltunen commented 8 years ago

Fixed in version 0.2.0