|
[Sponsors] |
How to implement equation while making a new solver |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 7, 2021, 11:42 |
How to implement equation while making a new solver
|
#1 |
New Member
yasmin
Join Date: Mar 2021
Posts: 2
Rep Power: 0 |
Hiya
I am trying to create a new solver which is supposed to calculate the flux equation, j=B/vlm[ln(γ_2 c_2 )-ln(γ_1 c_1 )] I implemented the equation in the way of C++ . C2 was defined as a volScalarField and the other variables were defined as dimensionScalar in the createfieldS file while (simple.correctNonOrthogonal()) As implemented in the description below { fvVectorMatrix memfluxEqn int main() ( float B,vlm,C1,C2,gmm2,gmm1; cin >>B; cin >>vlm; cin >>C1; cin >>gmm2; cin >>gmm1; cin >>C2; ); std::cout << B/vlm*(log(C2*gmm2)-log(C1*gmm1)) <<endl; // memfluxEqn.relax(); // memfluxEqn.solve(); } // Passive scalar transport equation while (simple.correctNonOrthogonal()) { fvScalarMatrix psiEqn ( fvm::ddt(C2) +fvm::div(phi, C2) -fvm::laplacian(gammaC2, C2) ); psiEqn.relax(); psiEqn.solve(); } runTime.write(); However, when I run the whole files in Ubuntu terminal I’m constantly receiving this error messages Please can someone help me to solve this error? I would really really appreciate some help. I have attached a photo of the error |
|
|
|
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 21:43 |
Domain Reference Pressure and mass flow inlet boundary | AdidaKK | CFX | 75 | August 20, 2018 05:37 |
Problem with Velocity Poisson Equation and Vector Potential Poisson Equation | mykkujinu2201 | Main CFD Forum | 1 | August 12, 2017 13:15 |
Poisson equation in custom solver diverges for large boundary values | babakflame | OpenFOAM Running, Solving & CFD | 2 | May 23, 2017 20:11 |
Help for the small implementation in turbulence model | shipman | OpenFOAM Programming & Development | 25 | March 19, 2014 10:08 |