|
[Sponsors] |
Trying to get kinematicCloud properties in twoPhaseSystem.C |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 3, 2019, 03:38 |
Trying to get kinematicCloud properties in twoPhaseSystem.C
|
#1 |
New Member
Bo CHEN
Join Date: Jun 2019
Posts: 2
Rep Power: 0 |
Hi guys,
I'm trying to merge the solver DPMFoam with reactingTwoPhaseEulerFoam. However, I don't know how to access basicKinematicCollidingCloud.theta() in twoPhaseSystem::solve(). In the other thread Access particle data from functionObject They suggested using [CODE] const kinematicCloud& myCloud = obr_lookupObject<kinematicCloud> ("kinematicCloud"); [CODE] However, when I include "#include basicKinematicCollidingCloud.H" in twoPhaseSystem/twoPhaseSystem.C and add that code, I get errors: [CODE] error: 'obr_' was not declared in this scope [CODE] So, can anyone give me some hints about how to change the code to let me get the value of "kinematicCloud.theta()" in twoPhaseSystem::solve() function, just as the theta() could be calculated in DPMFoam? Thanks! |
|
June 3, 2019, 06:24 |
|
#2 |
Member
Join Date: Dec 2018
Location: Darmstadt, Germany
Posts: 87
Rep Power: 8 |
Hey chenbo,
well, it looks like the line you cited is missing a point (literally) Code:
const kinematicCloud& myCloud = obr_.lookupObject<kinematicCloud> ("kinematicCloud"); Code:
#include "kinematicCloud.H" /* ... */ const kinematicCloud& lagrangeCloud = this->mesh_.lookupObject<kinematicCloud> ("kinematicCloud"); auto lagrangeTheta = lagrangeCloud.theta(); Cheers RP |
|
June 3, 2019, 11:29 |
|
#3 | |
New Member
Bo CHEN
Join Date: Jun 2019
Posts: 2
Rep Power: 0 |
Quote:
Thanks for your kindly reply. 1. I did miss a "." in the original post, but I input it right in the code, there's still several errors while compiling, because, as you said, "obr_" is not callable (the compiler suggested using "db_", which was not working either). 2. I did your code, now it compiles well, no errors occur, thanks a lot, really appreciate your help. My research time may be halved by your help. The forum is really a nice and warm community. I wish I could know OpenFOAM as much as you guys do, so I can post replies to help others. Now I'll go make some experiments based on the code. Thanks again. Have a nice day. |
||
April 28, 2022, 12:54 |
|
#4 |
Member
Huan Zhang
Join Date: Nov 2020
Posts: 55
Rep Power: 6 |
Dear chenbo,
I know this thread is a long time ago, but I am also coupling these two solvers these days. So I wonder did you couple these two solvers to simulate three-phase flow? where two phases used Euler and the other used lagrangian method? If so, how did you calculate the alpha1 and alpha2 in twoPhaseSystem.C? Are they related to 1 - kinematicCloud.theta()? Thanks for your help, I am really struggled with this recently Kind regards, Jasper |
|
Tags |
twophaseeulerfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting the height of the stream in the free channel | kevinmccartin | CFX | 12 | October 13, 2022 22:43 |
Domain Reference Pressure and mass flow inlet boundary | AdidaKK | CFX | 75 | August 20, 2018 06:37 |
Inconsistencies in reading .dat file during run time in new injection model | Scram_1 | OpenFOAM | 0 | March 23, 2018 23:29 |
Adding material to CFX material library | marlon | CFX | 2 | October 16, 2016 10:33 |
error message | cuteapathy | CFX | 14 | March 20, 2012 07:45 |