|
[Sponsors] |
December 8, 2007, 08:15 |
Hello there,
I have some pr
|
#1 |
Senior Member
|
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
__________________
Holger Marschall web: http://www.holger-marschall.info mail: holgermarschall@yahoo.de |
|
December 10, 2007, 14:44 |
Any idea as to what might be c
|
#2 |
Senior Member
|
Any idea as to what might be causing this?
What went wrong? --- Holger
__________________
Holger Marschall web: http://www.holger-marschall.info mail: holgermarschall@yahoo.de |
|
December 10, 2007, 16:24 |
2. the dragModels have been de
|
#3 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Urgently Need the code of Lift force and VM force | Kai Yan | Main CFD Forum | 0 | July 16, 2008 08:07 |
Lift force | alvio | CFX | 0 | March 12, 2008 18:53 |
Lift force or coefficient of lift | Rola | FLUENT | 1 | November 12, 2006 14:29 |
how to calculate prssure force & lift force in CFX | zaidun | CFX | 4 | March 28, 2006 03:06 |
Lift Force | Min-Hua Wang | CFX | 0 | December 2, 2003 19:21 |