|
[Sponsors] |
Adding a scalar transport equation to buoyantPimpleFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 4, 2019, 23:44 |
Adding a scalar transport equation to buoyantPimpleFoam
|
#1 |
Member
Join Date: Apr 2019
Location: India
Posts: 81
Rep Power: 7 |
Hello Everyone,
I am trying to add a scalar transport equation to buoyantPimpleFoam, which is a compressible solver. Code:
fvScalarMatrix rhoEEqn ( fvm::ddt(rhoE) + fvm::div(phi, rhoE) - fvm::laplacian(a, rhoE) ); rhoEEqn.solve(); Code:
--> FOAM FATAL ERROR: incompatible dimensions for operation [rhoE[0 -3 0 0 0 1 0] ] + [rhoE[1 -6 0 0 0 1 0] ] From function void Foam::checkMethod(const Foam::fvMatrix<Type>&, const Foam::fvMatrix<Type>&, const char*) [with Type = double] in file /home/user/OpenFOAM/OpenFOAM-6/src/finiteVolume/lnInclude/fvMatrix.C at line 1283. The error pops up when the divergence term is included. I was able to successfully add this scalar equation to buoyantBoussinesqPimpleFoam (incompressible solver). The dimension of rhoE is [0 -3 1 0 0 1 0] Does adding a scalar transport equation to a compressible solver, need any special modification? Is the dimension of phi different in a compressible sovler? Unfortunately, I could not find any tutorial on adding a scalar transport equation to a compressible solver. Kindly, please give me a direction in solving this. Thank You. With Thanks, Pavithra. |
|
July 5, 2019, 04:15 |
|
#2 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi,
if you have a passive scalar transport equation the general equation is: Thus, the time derivative in FOAM should have the following: Code:
fvm::ddt(rho, rhoE)
__________________
Keep foaming, Tobias Holzmann |
|
July 5, 2019, 04:43 |
|
#3 | |
Member
Join Date: Apr 2019
Location: India
Posts: 81
Rep Power: 7 |
Quote:
Respected Sir, Thank you so much for your kind help. I followed your advice and defined the scalar transport equation as below Code:
fvScalarMatrix rhoEEqn ( fvm::ddt(rho, rhoE) //Time derivative + fvm::div(phi, rhoE) //Convective term - fvm::laplacian(a*rho, rhoE) //Diffusive Term ); rhoEEqn.solve(); Thank You. With Thanks, Pavithra. |
||
July 16, 2019, 06:52 |
|
#4 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
||
July 16, 2019, 06:57 |
|
#5 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi Mark,
the function object is a possible and very easy option, I agree. Also the fields should be available during run-time while you can lookup the quantity and re-use it whereever you want. Crazy how powerful the function objects are.
__________________
Keep foaming, Tobias Holzmann |
|
July 18, 2019, 04:25 |
|
#6 |
Member
Join Date: Apr 2019
Location: India
Posts: 81
Rep Power: 7 |
Respected Prof. Mark Olesen,
Thank you so much for your suggestion. I am very new to OpenFoam. Could you please give me some direction for me to learn about functionObjects. I am interested in learning about that and solve a scalar transport equation using fucntionObject. Thank You. With Thanks, Pavithra. |
|
July 22, 2019, 23:20 |
|
#7 |
Member
Join Date: Apr 2019
Location: India
Posts: 81
Rep Power: 7 |
Hello Everyone,
I tried to use functionObject to solve a scalar transport equation as suggested by Dr. Mark Olesen. I was able to do it successfully. Now I have a transport equation, which has two convective fluxes. I am puzzled, if I can solve this using functionObject. My base solver is buoyantPimpleFoam and I use OF v6. My transport equation is Here, - Electric charge density - velocity - flux field defined by user - Diffusion coefficient Kindly, please give me a direction to solve this. I want to define a source term which is dependent on this scalar (). Thank You. |
|
Tags |
buoyantpimplefoam, compressible flow, dimension, scalar transport |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Regarding 1D scalar transport equation | phani45 | OpenFOAM Running, Solving & CFD | 0 | September 3, 2017 21:56 |
adding a constant volumetric source term to transport equation in a particular region | cfdonline2mohsen | OpenFOAM Programming & Development | 15 | February 16, 2017 10:55 |
using a Fortran library of thermodynamics inside sutherland transport model | Mehdi3031 | OpenFOAM Programming & Development | 0 | April 7, 2016 10:34 |
Issue symmetryPlane 2.5d extruded airfoil simulation | 281419 | OpenFOAM Running, Solving & CFD | 5 | November 28, 2015 14:09 |
Problem diverges: Scalar transport equation, variable: Species transport, material | shahrbanoo | AVL FIRE | 0 | July 24, 2014 09:52 |