New scalar in phaseModel.c
-
@kimy because the position of this part
scalar alphaMax() const { return alphaMax_; }
in phaseModel.H belong to the declaration of class phaseModel.
so you do have to name alphaMax() as phaseModel::alphaMax()
as for "Foam::", just for rigorous."declaration in H and define in C" is not something like ban. just a rule free to follow. and it's a good habit.
you had edit your last post and delete the important part. I've seen it. you lost a ";". and error also said "invalid declarator before 'd'"
-
@bestucan I am a little bit crazy because my files are totally same as yours.......Still error after run. Note that I did not change the default library into user's library (All of them I leave it as defualt "LIB = $(FOAM_LIBBIN)/liblibcompressibleTwoPhaseSystem"
). -
Selecting default blending method: none Selecting dragModel for (solids in water): SchillerNaumann Selecting swarmCorrection for (solids in water): none #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigSegv::sigHandler(int) at ??:? #2 ? in /lib64/libc.so.6 #3 ? at ??:? #4 __libc_start_main in /lib64/libc.so.6 #5 ? at ??:? Segmentation fault (core dumped)
-
@kimy do it slowly.
1 find a normal case which works well. ensure basement is good
2 add myBeta() only, and not use it. ensure compile works
3 use cout << myBeta() << "somg flag". ensure function myBeta() works.
4 use myBeta_ as a constant value in calculation. ensure framework is well.
5 use myBeta_ as variabledivide int more step if needed
then use it as your wish. special case, special solver. If something wrong. there's nothing to do with myBeta(). maybe case? maybe solver? maybe variable overflow?
you combine all steps into one step. it's hardly to debug.
have you print myBeta_ value? just same as the value in case file?the error message seems not a special error. something about cout (Ostream&)
-
-
@bestucan Thanks a lot. What you mean is that you did not meet any problem in your OpenFOAM version? Could you please upload the whole modified solver files here (twophaseeulerfoam)? The files I uploaed above was copied from blueCFD (maybe openfoam 5). Additionally, I am also using HPC where openfoam-v1906 is loaded.
-
This is the solver file of openfoam_v1906
-
coagulation. complex for me to compile your solver. downloading and compiling openfoam 5 and openfoam v1906 cost lot of time. and several source file end with ".T.C" hadn't been upload.
emmm..... not a good way to debug. we have different OS and different environment.
anyway, you've solved the problem.