CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   time-varying internalField (https://www.cfd-online.com/Forums/openfoam-programming-development/112935-time-varying-internalfield.html)

klio February 8, 2013 02:50

time-varying internalField
 
Hello!

I edited the chtMultiRegionFoam Solver so that it is possible to add a volumetric heat source to a region!

Now I want to implement a circuit where the heat source is switched on and off.
The problem is that the heat source entry has to be changed in the internalField because it is volumetric -> If i change the BC with timeVaryingMappedFixedValue of course it has no effects on the simulation !

Does anyone know how to fix that Problem?

Thanks! Klio

Hisham February 9, 2013 18:02

Quote:

Originally Posted by klio (Post 406663)
Hello!

I edited the chtMultiRegionFoam Solver so that it is possible to add a volumetric heat source to a region!

Now I want to implement a circuit where the heat source is switched on and off.
The problem is that the heat source entry has to be changed in the internalField because it is volumetric -> If i change the BC with timeVaryingMappedFixedValue of course it has no effects on the simulation !

Does anyone know how to fix that Problem?

Thanks! Klio

Hello Klio

If I understood correctly, a single scalar can be multiplied by the source term. This scalar can be your switch: 1 = lights on, 0 = lights off.

You can even make it a volScalarField and turn it on in some cells and off for others.

Hisham

klio February 19, 2013 03:32

oh! ok that sounds very simple! :) Thank you!

how can i implement the switch? is it possible to code it in the controlDict?

Hisham February 19, 2013 08:04

Quote:

Originally Posted by klio (Post 408626)
oh! ok that sounds very simple! :) Thank you!

how can i implement the switch? is it possible to code it in the controlDict?

Sounds simple but to implement it you need to read the manual (chapter 3 in particular). Other tutorials on programming with OpenFOAM should also be helpful.

However, you need to slightly modify the code not an input for that in (e.g. controlDict) or so.


Hisham

cliffoi February 19, 2013 22:17

Hi Kilo,
My suggestion would be to use the expressionField or manipulateField functionObject in the swak4foam library.
http://openfoamwiki.net/index.php/Contrib/swak4Foam

Hope this helps
Ivor

letzel April 12, 2013 06:10

Hi Kilo,

have you been successful with your solver? I would much appreciate if you could post your modified source code along with an example case that shows how to set up a time-dependent volumetric heat source.

Best regards,
Marcus


All times are GMT -4. The time now is 21:18.