|
[Sponsors] |
error in 2.3.0 - Dimensions of phi are not correct |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 8, 2014, 06:31 |
error in 2.3.0 - Dimensions of phi are not correct
|
#1 |
Member
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 12 |
Hello,
I am quite new to OpenFOAM and have run into some problems. I am trying to implement a solver for a multiphase system coupled with population balance (DQMOM). For this purpose, I am using a modified twoPhaseEulerFoam solver. The code was not written by me, I am just trying to edit it and implement if for my problem. The solver code was originally written for version 1.6 and I am using for OpenFOAM 2.3.0. However, whenever I run the solver on my test case, I get the following error: Code:
--> FOAM FATAL ERROR: dimensions of phi are not correct From function CrankNicolsonDdtScheme<Type>::fvcDdtPhiCorr in file finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C at line 1162. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) in "/home/misra/OpenFOAM/misra-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #1 Foam::error::abort() in "/home/misra/OpenFOAM/misra-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #2 Foam::fv::CrankNicolsonDdtScheme<Foam::Vector<double> >::fvcDdtPhiCorr(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) in "/home/misra/OpenFOAM/misra-2.3.0/platforms/linux64GccDPOpt/lib/libfiniteVolume.so" #3 in "/home/misra/OpenFOAM/misra-2.3.0/platforms/linux64GccDPOpt/bin/multiPhasePbeFoam" #4 in "/home/misra/OpenFOAM/misra-2.3.0/platforms/linux64GccDPOpt/bin/multiPhasePbeFoam" #5 __libc_start_main in "/lib64/libc.so.6" #6 in "/home/misra/OpenFOAM/misra-2.3.0/platforms/linux64GccDPOpt/bin/multiPhasePbeFoam" Aborted The multiphase solver (multiPhasePbeFoam) can be found here and the test case (using 3 moments) is here. Regards, Anurag PS: Because of the version differences, I replaced ddtPhiCorr with ddtCorr in pEqn.H as per this post. The solver would not compile without this change. Last edited by anuragm; September 11, 2014 at 04:47. Reason: Added more information |
|
September 11, 2014, 04:45 |
|
#2 |
Member
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 12 |
To add to the above post, the solver is a modification of twoPhaseEulerFoam - it has been modified to solve for n (dispersed) + 1 (continuous) phases.
|
|
September 14, 2014, 06:27 |
|
#3 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings Anurag,
It requires a lot of coding changes, not simply a replacement of "ddtPhiCorr with ddtCorr" Given the complexity of the code, I'll only be able to give you a few indications on how to proceed:
Bruno
__________________
|
|
September 17, 2014, 05:39 |
|
#4 |
Member
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 12 |
Hi Bruno,
Thank you for the reply. Your suggestion was helpful. I am trying to see how different are the new pEqn.H files from the older ones (for both twoPhaseEulerFoam and multiPhaseEulerFoam). In my case, the twoPhaseEulerFoam solver was modified to solve for n+1 phases. So you are correct, the corrections will not be straightforward. I will post again in case I encounter more difficulties. Regards, Anurag |
|
September 18, 2014, 04:42 |
|
#5 |
Member
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 12 |
Hi Bruno,
I compiled the solver again making some changes in the pEqn.H file. This time I receive the following error message. Code:
--> FOAM FATAL ERROR: Different dimensions for += dimensions : [1 0 -1 0 0 0 0] = [0 3 -1 0 0 0 0] From function dimensionSet::operator+=(const dimensionSet&) const in file dimensionSet/dimensionSet.C at line 185. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) in "/home/misra/OpenFOAM/misra-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #1 Foam::error::abort() in "/home/misra/OpenFOAM/misra-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #2 Foam::dimensionSet::operator+=(Foam::dimensionSet const&) const in "/home/misra/OpenFOAM/misra-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #3 Foam::DimensionedField<double, Foam::surfaceMesh>::operator+=(Foam::DimensionedField<double, Foam::surfaceMesh> const&) at ~/OpenFOAM/OpenFOAM-2.3.0//src/OpenFOAM/lnInclude/DimensionedField.C:508 #4 Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>::operator+=(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ~/OpenFOAM/OpenFOAM-2.3.0//src/OpenFOAM/lnInclude/GeometricField.C:1215 #5 Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>::operator+=(Foam::tmp<Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> > const&) at ~/OpenFOAM/OpenFOAM-2.3.0//src/OpenFOAM/lnInclude/GeometricField.C:1215 #6 at ~/OpenFOAM/misra-2.3.0/applications/solvers/multiphase/multiPhasePbeFoam/pEqn.H:25 #7 __libc_start_main in "/lib64/libc.so.6" #8 in "/home/misra/OpenFOAM/misra-2.3.0/platforms/linux64GccDPOpt/bin/multiPhasePbeFoam" Aborted Code:
phiDragb += fvc::interpolate((alpha[i]/rhob)*K[i]*rUbA)*phia[i]; http://pastebin.com/HEEe22Ff Do you have any ideas where to go from this point? Regards, Anurag |
|
September 18, 2014, 06:30 |
|
#6 |
Member
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 12 |
I managed to solve the above error by adding the following lines to my pEqn.H file
Code:
surfaceScalarField phiDragb ( IOobject ( "phiDragb", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedScalar("phiDragb", dimArea*dimVelocity, 0) ); In essence, I defined the offending variable (phiDragb) to have the required dimensions. Right now I am trying unsuccessfully calculate the deformation rate tensor. The problem seems to be similar - related to the dimensions. I am trying to solve this one and will post here again in case I hit a wall. |
|
September 23, 2014, 09:51 |
|
#7 |
Senior Member
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23 |
@anuragm: Can you post your solver files here please??
|
|
November 17, 2014, 06:27 |
|
#8 |
Member
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 12 |
Hi Vasava,
I am sorry but I saw your post only now. I figured I needed to understand the basics behind my problem before I could seek further help here on this forum. Although I could make the solver run, I had some problems with my results. So I am trying a different approach. I have been working on implementing DQMOM in the multiphaseEulerFoam solver in OpenFOAM 2.1.1/2.3.x on my own. I dont know if you were looking for help or offering it. PS: My solver files were uploaded and linked in the first post. |
|
November 17, 2014, 09:25 |
|
#9 |
Senior Member
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23 |
Thanks anuragm!. At that time I was exploring possibilities of using population balance within openfoam and was keen about your solver and problem. Can you re-post the solver if you have made any modifications. Also a test example would also be of great help.
Thanks for replying!! |
|
November 18, 2014, 13:56 |
|
#10 |
Member
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 12 |
Hi Vasava,
I will upload the files this week. Just to let you know, I was having problems with the effect of gravity. Let me know if you are able to validate the results using these files. |
|
November 26, 2014, 08:47 |
|
#11 |
Member
Anurag
Join Date: Aug 2014
Location: Germany
Posts: 57
Rep Power: 12 |
Hi Vasava,
After talking to my colleagues at work, I'm afraid I cannot send you the files because I do not own the code. It is best you contact the original authors of the paper. Development and implementation of a polydispersed multiphase flow model in OpenFOAM |
|
November 27, 2014, 02:46 |
|
#12 |
Senior Member
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23 |
Thats ok. I will send them message my self.
|
|
November 30, 2014, 01:16 |
|
#13 | |
Senior Member
|
Quote:
I think the problem is with the dimensions of the code line. Since, you cannot share your data due to some constraints. I would advice you to check the dimension of both the RHS terms of the below mentioned equation. Code:
phiDraga[i] = fvc::interpolate(beta/phasea[i].rho()*K[i]*rUaA)*phib + rUaAf[i]*(g & mesh.Sf()); - Best Luck! |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
phi -= pEqn.flux() vs. linearInterpolate(U) & mesh.Sf() | santiagomarquezd | OpenFOAM Programming & Development | 33 | October 15, 2019 11:24 |
interFoam | Hydraulic Jump | Correct boundary condition p_rgh | pythag0ra5 | OpenFOAM Running, Solving & CFD | 17 | September 5, 2014 05:31 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
porousInterFoam - problem setting correct bcs | Natalie2210 | OpenFOAM Running, Solving & CFD | 2 | December 2, 2013 06:26 |
Dimensions of laplacian in PISO loop | kumar2 | OpenFOAM Running, Solving & CFD | 2 | July 3, 2006 15:34 |