Hello there,
I have some pr
Hello there,
I have some problems with the implementation of lift force models in bubbleFoam, hopefully someone can help me: Basically what I'm trying to do is to implement a lift model in the bubbleFoam solver analogical to the drag model implemented in the twoPhaseEulerFoam solver. I've added the drag model from twoPhaseEuler to BubbleFoam before and it's working fine. Then I've created a folder "liftModels" with subfolders "liftModel" and "Tomiyama", including liftModel.H, liftModel.C and so on, everything exactly like it's done for the drag (also updated lnInclude and the files and options in the make directory). Lastly I duplicated the drag model files and renamed all "drag" with "lift". In createFields.H I added the runtime-selection pointer autoPtr<liftmodel> lift = liftModel::NewMy liftDragCoeffs looks like this at the moment: 'L' is implemented like 'K' for the drag in twoPhaseEulerFoam (e.g. interfacialModels/dragModels/SchillerNaumann.C), the correlating part in my Tomiyama.C file is (I've skipped some lines here too keep my text from getting even longer, of course the above is not really Tomiyama) Now my two problems: 1. If I comment out the line "volScalarField Clift = lift->L(magUr);" in liftDrafCoeffs.H everything works fine, if I don't I can compile the code but starting the solver brings up the following error Obviously is has to do something with the volScalarField Clift = lift->L(magUr); What I don't understand here is how left and right hand side can have different dimensions and how it can happen at all if Clift is not further used? 2. Regarding the lift implementation my code doesn't make too much sense like this, what I really want to do is get back a dimensionedScalar from the function 'L' (like dimensionedScalar Clift=lift->L(magUr); and then have 'L' calculating the liftCoefficient as dimensionedScalar. However if I change the syntax to I get the error message (Of course I've changed the syntax not only in Tomiyama.C but also in liftModel.H, Tomiyama.H and liftModel.H): So how can I have a function give back a "dimensionedScalar" value? Also, to avoid further problems like this, where could I look it up, I've looked for other OpenFoam functions doing something similar but what I found wasn't very helpful. Hope my description isn't too confusing, any help is appreciated. Best Regards Holger |
Any idea as to what might be c
Any idea as to what might be causing this?
What went wrong? --- Holger |
2. the dragModels have been de
2. the dragModels have been defined to return a tmp<volscalarfield> so your model will have to adhere. It can be a uniform volScalarField though.
1. From the traceback your model does a '-' somewhere. If you recompile your model with full debugging (-g -O0) it should show you the exact line number. |
All times are GMT -4. The time now is 20:44. |