CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swak4Foam] and twoPhaseEulerFoam (https://www.cfd-online.com/Forums/openfoam-community-contributions/166236-twophaseeulerfoam.html)

mnikku February 5, 2016 03:56

and twoPhaseEulerFoam
 
Hi,
I have been trying to do some circulating fluidized bed simulations with twoPhaseEulerFoam and utilizing groovyBC for circulation of the elutriated particles back to the system.

I am using openFoam-3.0.1 and swak4foam-0.4.0 (managed to get it working with these instructions).

I've had a lot of problems with mass (or energy) conservation (probably more on these issues on other posts after this test) and I am currently trying to eliminate possible sources of errors, one of which could be the particle circulation code.

The swak4foam code was taken from here but I was recently told that twoPhaseEulerFoam solver uses alphaRhoPhi-variables (1 and 2) for mass flow of both phases (twoPhaseEulerFoam/createFields.H). The problem is that I cannot/don't konw how to use this variable directly for swak4foam. I have tried variables

Code:

               
phase1_.alphaRhoPhi();
alphaRhoPhi1;
phase1.alphaRhoPhi();

(with aliases to avoid confusion with _ . and () ) without success. All tries end up with this error in the beginning of the simulation:

Code:

PIMPLE: iteration 1
swak4Foam: Setting default mesh
swak4Foam: Allocating new repository for sampledGlobalVariables
--> FOAM Warning :
    From function ConcretePluginFunction<DriverType>::exists
    in file lnInclude/ConcretePluginFunction.C at line 121
    Constructor table of plugin functions for PatchValueExpressionDriver is not initialized


--> FOAM FATAL ERROR:
 Parser Error for driver PatchValueExpressionDriver at "1.5-8" :"field aRP not existing or of wrong type"

, where ARP is my alias for alphaRhoPhi.

This leaves me with several questions:
1) What variables can swak4foam get from a solver? Are they predefined somehow somewhere or do they need to be saved to a file?
2) How to successfully implement this kind of circulation code?

It was also suggested that this circulation could be done with a custom boundary condition, but I would rather utilize this simpler and (to me) less complex method.

Thanks in advance!

mnikku February 19, 2016 05:21

So the correct answer to this issue was "alphaRhoPhi.particles" which is quite logical, silly me... :rolleyes:
Way to confirm this was by adding this to the "controlDict" under "functions":
Code:

whichFields {
  type listRegisteredObjects;
}

This gives a list of objects visible to swak4foam.

So, lets see if this remedies the mass conservation issues.


All times are GMT -4. The time now is 04:32.