CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

fvModels not working

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 16, 2024, 10:25
Question fvModels not working
  #1
New Member
 
Matias Alberto Aguirre
Join Date: Mar 2023
Posts: 11
Rep Power: 3
maguirre is on a distinguished road
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)
         )
     );
so fvModels is accepted. Maybe I am seeing the wrong equation?

Please, feel free to ask me anything poorly explained, or any file needed.

-Matias
maguirre is offline   Reply With Quote

Old   May 17, 2024, 12:47
Default So simple!
  #2
New Member
 
Matias Alberto Aguirre
Join Date: Mar 2023
Posts: 11
Rep Power: 3
maguirre is on a distinguished road
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; 
}
changed "system" for "constant" and now is being read.

I still have a question related to the heat (Q or q) inside source dictionary. Q is in W and q in \frac{W}{m^{3}}? If that is the case, when I introduce Q, does the solver first divide by the volume of the cellZone indicated?

The question is related to the notes in
HTML Code:
https://doc.cfd.direct/notes/cfd-general-principles/conservation-of-energy#x38-46004r51
where it says
Quote:
If we consider mechanical and thermal energy, it can be expressed by

\rho*\frac{De}{Dt}+\rho*\frac{DK}{Dt}=-\nabla*q+\rho r+...
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
maguirre is offline   Reply With Quote

Reply

Tags
fluid, fvmodels, heatsource, not working, openfoam11


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
TUI - Strange behavior related to the working directory Dav[ID] FLUENT 5 September 6, 2022 15:45
Porous media coefficients and working fluid Dronzer FLUENT 1 June 30, 2020 23:23
findCell() in parallel: not working if location is outside the domain TobiWol OpenFOAM 0 January 10, 2018 15:33
Processor 0 not working vishwesh OpenFOAM Running, Solving & CFD 0 November 17, 2017 04:35
DPM parallel is not working but serial is working johnwinter FLUENT 1 March 27, 2012 03:01


All times are GMT -4. The time now is 05:20.