|
[Sponsors] |
[OpenFOAM 11] Adding new equations in modular solvers |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 4, 2024, 20:09 |
[OpenFOAM 11] Adding new equations in modular solvers
|
#1 |
New Member
Aryaman
Join Date: Apr 2024
Posts: 1
Rep Power: 0 |
I'm setting up a custom modular solver to simulate electrochemical cells in OpenFOAM 11. I've created a derived class from multicomponentFluid that compiles and runs.
I'm currently attempting to add in another scalar field variable for the electric potential, but I cannot figure out how to do that exactly (OF10 & OF2312 are straightforward with this). This is what I attempted (does not compile): customFluid.C: Code:
Foam::solvers::customFluid::customFluid(fvMesh& mesh) : multicomponentFluid(mesh), E_( IOobject("E", runTime.name(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE), mesh ), E(E_) {} Code:
... class customFluid: public multicomponentFluid { protected: volScalarField &E_; private: public: const volScalarField &E; TypeName("customFluid"); ... } Would appreciate any help on this! Last edited by blackk100; April 4, 2024 at 20:10. Reason: Formatting |
|
Tags |
openfoam 11 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Guide: Writing Equations in LaTeX on the CFD Online Forums | pete | Site Help, Feedback & Discussions | 27 | May 19, 2022 04:19 |
Adding extra terms in governing equations | Alek | FLUENT | 0 | January 30, 2014 11:20 |
Adding two Energy Equations to Porous Solver | Filankes | OpenFOAM Programming & Development | 2 | December 3, 2013 06:20 |
modelling Differential equations in a udf | RikardMNorén | Fluent UDF and Scheme Programming | 2 | October 1, 2013 04:36 |
Adding equations to existing solvers | treima | OpenFOAM Programming & Development | 0 | July 9, 2012 10:46 |