|
[Sponsors] |
Concentration Modification to ScalarTransportFoam: Ptr unallocated Issue |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 5, 2019, 17:47 |
Concentration Modification to ScalarTransportFoam: Ptr unallocated Issue
|
#1 |
New Member
Join Date: May 2018
Posts: 4
Rep Power: 8 |
To begin i apologize if im unaware for many things as im not that most knowledgeable of everything on openfoam and all of its source code.
I am attempting to modify the ScalarTransportFoam solver for a diffusion of a particular ion concentration. The equation that i need to solver for is; d/dt (C) = - Div(N) + R; Where N is the mass transfer flux depending on C And R is the reaction rate depending on C also. I have gotten the solver to be able to run only by writing the equation in terms of the time partial derivative of C and the laplacian of C rather than even using the mass transfer flux. Although i should be solving that term explicitly. Ie. fvm::ddt(C) == -fvm::laplacian(C) + fvOptions; Does run but obviously not as i want it to. But i couldnt solve the laplacian explicitly. fvm::ddt(C) == -fvc::laplacian(C) + fvOptions; As it gave me the error: --> FOAM FATAL ERROR: lowerPtr_ or upperPtr_ unallocated From function const scalarField& Foam::lduMatrix::lower() const in file matrices/lduMatrix/lduMatrix/lduMatrix.C at line 269. Eventually i went to solve the issue with using the mass transfer flux, which is a different issue in its own. Although i came across the same error using; fvm::ddt(C) == -fvc::div(N) + fvOptions(C); So i assumed that using this equation (inside fvScalarMatrix), is causing an issue with creating the coefficients of the matrix and therefore a part or all of the matrix is unallocated. I could not seem to find a solver that solved a simple case with only one implicit variable on the LHS, so im not exactly sure how to approach this issue. Ive been stuck for about a month on this issue so any suggestions would be great. Thank you! Last edited by Braedan; November 5, 2019 at 17:52. Reason: Grammer |
|
November 6, 2019, 10:58 |
|
#2 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66 |
What OpenFOAM are you using? If very old, it can be an old bug. Otherwise, there's just not enough info to determine what's wrong except we can 100% your solver will not work.
What this means? You mean you are declaring a tmp<fvScalarMatrix>? Because that might break it. |
|
Tags |
ptr_unallocated, scalartransportfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
scalarTransportFoam issue with dynamic meshes | Thangam | OpenFOAM Programming & Development | 5 | August 18, 2015 16:52 |