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

Creating a rhoCentralFoam with a minimum Energy

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 1, 2019, 10:42
Default Creating a rhoCentralFoam with a minimum Energy
  #1
New Member
 
c
Join Date: Nov 2017
Posts: 4
Rep Power: 9
c_underwood is on a distinguished road
I am trying to create a new solver which is effectively rhoCentralFoam, but with a way of giving a min energy to the simulation.
The reason I want to do this is because I am trying to simulate a Gas Nozzle and the temperature keeps dropping below 0K, which causes a crash.

I found on here:
Instability solving low-density plume expansion with rhoCentralFoam
where changing line 218 in openfoam6 from:
e = rhoE/rho - 0.5*magSqr(U);
to
e = max(rhoE/rho - 0.5*magSqr(U),minE);

I now want to be able to add minE to the control dict, and then I will be able to enter my value in there. However, I can't work out how the control dict is read in, and whether I can make a modification for just my new solver?

If someone could point me in the right direction for adding this minE term and reading it into my new solver that would be great.
c_underwood is offline   Reply With Quote

Old   March 1, 2019, 11:01
Default
  #2
Member
 
Join Date: Dec 2018
Location: Darmstadt, Germany
Posts: 87
Rep Power: 7
raumpolizei is on a distinguished road
Hello c_underwood,

it is strange that your temperature goes below 0 K, are you getting negative energies or something alike in your domain? I don't think it's a too good idea to bind the energy or temperature in such a manner. Nonetheless, regarding your issue, you could do something like this (assuming thermo is a reference to your thermodynamics object in your simulation):
Code:
// In your createFields.H - of1612
dimensionedScalar minEnergy(static_cast<dictionary>(thermo).lookup("eMin"));
the entry eMin will have to be specified in your case/constant/thermodynamicProperties file, which is in my opinion better than the controlDict.
raumpolizei is offline   Reply With Quote

Old   March 29, 2022, 04:49
Default Mining Digital Energy Currency
  #3
New Member
 
PermianChain Technologies Inc.
Join Date: Dec 2021
Posts: 1
Rep Power: 0
permianchain is on a distinguished road
PermianChain Technologies Inc. is operating the world’s first Blockchain-as-a-Service (BaaS) platform for natural resources, enhancing transparency, efficiency and profitability for our stakeholders. We discover the effective ways to harness the blockchain’s potential, using data science and AI to digitise, tokenize and capitalise on proven but undeveloped natural resources. If you’d like to hear more about how PermianChain is enhancing oil and gas trading and investment, join our mailing list today.
permianchain is offline   Reply With Quote

Reply

Tags
controldict, rhocentralfoam, solver development


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
help with energy eq divergence lord_rayleigh FLUENT 1 July 18, 2014 09:12
Natural convection, problems with total energy balance MdoNascimento STAR-CCM+ 0 March 13, 2014 13:15
rhoCentralFoam: making sense of the diffusive corrector equation for energy tatu OpenFOAM Running, Solving & CFD 5 February 19, 2013 09:19
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 16:45
Energy dissipation and Drag coefficient Freeman Main CFD Forum 10 January 27, 2006 08:42


All times are GMT -4. The time now is 10:57.