|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Matias Alberto Aguirre
Join Date: Mar 2023
Posts: 11
Rep Power: 3 ![]() |
Hello everyone!
I'm new to OpenFOAM, I used to work with ElmerGUI, and this command and file system is a bit confusing for me yet. My case is a box filled with air with a tiny zone heated. This heat should increase the temperature inside the box and therefore its pressure. My objective is to see how this pressure increases at the walls of the box. After some time working with Elmer, we decided that an explosive phenomenon must be considered, so we started working with OpenFOAM (Elmer does not have any package to work with related to this phenomenon) Currently, I am working with OpenFOAM 11 in WSL for Windows, the structure of folders and files are taken from an explosive case seen on the Internet. On the fvSolution file, PIMPLE whit transonic option are set and on controlDict, foamRun with the fluid solver, with the Internal Energy definition (I think, I am not so sure about that, but sensibleInternalEnergy is set under thermoType on thermophysicalProperties file). This works fine. The problem is the heat generated on that spot mentioned before. I read that to introduce a volumetric heat source is needed a file called fvModels inside either under system or constant folders. It seems that this file is not been read. I deliberately erase a semicolon at the beginning, at the FoamFile dictionary, to see if the compiler throws any error and nothing. Am I doing something wrong? Do I need to tell the compiler to read that file? I suppose is ok to introduce an energy source because at the thermophysicalPredictor reads Code:
fvScalarMatrix EEqn ( fvm::ddt(rho, he) + fvm::div(phi, he) + fvc::ddt(rho, K) + fvc::div(phi, K) + pressureWork ( he.name() == "e" ? fvc::div(phi, p/rho)() : -dpdt ) + thermophysicalTransport->divq(he) == ( buoyancy.valid() ? fvModels().source(rho, he) + rho*(U & buoyancy->g) : fvModels().source(rho, he) ) ); Please, feel free to ask me anything poorly explained, or any file needed. -Matias |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Matias Alberto Aguirre
Join Date: Mar 2023
Posts: 11
Rep Power: 3 ![]() |
This problem is solved community! It was such a little change. It matters where fvModels is located. I moved it from system to constant folder and at the beginning where it says
Code:
FoamFile { format ascii; class dictionary; location "system"; object fvModels; } I still have a question related to the heat (Q or q) inside source dictionary. Q is in W and q in ![]() The question is related to the notes in HTML Code:
https://doc.cfd.direct/notes/cfd-general-principles/conservation-of-energy#x38-46004r51 I assume that r is what I introduce with fvModels, but on those notes it says is "an internal source of strength r per unit mass". - Matias |
|
![]() |
![]() |
![]() |
Tags |
fluid, fvmodels, heatsource, not working, openfoam11 |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
TUI - Strange behavior related to the working directory | Dav[ID] | FLUENT | 5 | September 6, 2022 14:45 |
Porous media coefficients and working fluid | Dronzer | FLUENT | 1 | June 30, 2020 22:23 |
findCell() in parallel: not working if location is outside the domain | TobiWol | OpenFOAM | 0 | January 10, 2018 14:33 |
Processor 0 not working | vishwesh | OpenFOAM Running, Solving & CFD | 0 | November 17, 2017 03:35 |
DPM parallel is not working but serial is working | johnwinter | FLUENT | 1 | March 27, 2012 02:01 |