Hello alexeym,
I am trying to implement a source term for turbulent dissipation in a simulation using the standard k-epsilon model following your explanation about the scalarCodedSource. I ended up with this fvOptions file (where there is also a source for the momentum equation): Code:
/*--------------------------------*- C++ -*----------------------------------*\ Code:
--> FOAM Warning : Thanks |
Hi,
My advice: implement your own turbulence model ;) I.e. you take k-epsilon family model, copy it, rename it, add your code. There are certain conditions for fvOptions to work, see, for example, UEqn.H of pimpleFoam: Code:
tmp<fvVectorMatrix> UEqn During last workshop there was an idea of implementation of turbulence models, which use fvOptions framework. I do not know if there is any progress, for me it is still on TODO list. |
fvOptions heatsource in chtmultiregionsimpleFoam case in openfoam2.3.x
Hello everyone
I am implementing volumetric heat source in chtmultiregionsimplefoam with help of fvoptions files in that "duration ....." and " h(.... 0)" so my problem is 1) how to convert 200 W source into enthalpy h(... 0) with help of "duration ...." in sec 2) in that "fvOptions" file "duration..." so which time put here in duration |
Quote:
1) You don't need to convert nothing into nothing. For the case of using chtMultiRegionSimpleFoam you just have to put the thermal power value into the first place within the brackets, like that: Code:
energySource Hope it helps. Best regards, Alex |
@faraday
Quote:
Code:
inline bool Foam::fv::option::inTimeLimits(const scalar time) const Code:
bool Foam::fv::option::isActive() |
Thanks for the clarification Alexey! I didn't remember that because I never had to specify the duration of the source.
Everything must be clear now for @Sandeep. |
fvOptions heatsource in chtmultiregionsimpleFoam case in openfoam2.3.x
hello alex,
thank you for the replay , I used that syntax in fvOptions file but result showing no heat generation, it shows constant temperature when I use my fvOptins that showing heat generation it include "duration....." of time -------#---------------------------#-----------------------------#-------------------- heatSource { type scalarSemiImplicitSource; active on; timeStart 0.; duration 1e3; selectionMode cellSet; cellSet IC1; scalarSemiImplicitSourceCoeffs { // volumeMode absolute; // Values are given as <quantity> volumeMode specific; // Values are given as <quantity>/m3 injectionRateSuSp // Semi-implicit source term S(x) = S_u + S_p x { h (200000 0); } } } --------------------#--------------------------------#-----------------------#------------------#--- am trying to implement 200 W/m3 volumetric heat generating source for circuit board cooling |
Well, I don't understand why my specification is not working. As per what I see you are using a cellSet as a selection mode, while I sellect all cells belonging to one region. If you just copypasted all my specification of course it's not going to work...
Another point I don't get is why you are setting a generation of 200000 when you say your generation is supposed to be of 200 W/m2... If you give a higher value than the one you need, obviously the effect will be more visual and bigger... Regards, Alex Ps: excuse me if I wrote something wrong, I'm writing from my phone |
hello alex,
you are on the right way you see in src/fvOptios/lninclude/fvOptionListTemplates.C at line no 135 ds = rho.dimensions()*fld.dimensions()/dimTime*dimVolume rho * h *1/time * vol kg/m3 * j/kg * m3 / sec j/s W so here is dimTime in sec plese tell me how to implement 200 W/m3 heat generating source |
check this out!
|
hello alex
thank you for your humble reolay in fvoptions volumeMode absolute; // Values are given as <quantity> volumeMode specific; // Values are given as <quantity>/m3 what is "absolute" and "specific" if my heat generating element is 200 W having dimension 0.2m*0.01m*0.05m 1) if I consider "absolute" then total element given value is 200 W is this correct or not? 2) if I consider "specific" then total element each cell point given value is 200 W is this correct or not? |
Dear Sandeep,
the meaning of "absolute" and "specific" is given behind "//". Then, if you consider "absolute" mode you just have to give the constant source term a value of 200. On the other hand, if you prefer to use "specific" mode you have to use a value of 200/(0.2*0.01*0.05). That's all! Best regards, Alex |
thank you alex,
which parameter analyze in post processing.I thought that only temp of oullet, & velocity is analyze in chtmultiregionSimpleFoam and chtmultiRegionFoam please suggest me |
Hi,
I would like to follow up my previous post regarding the implementation of a source term for the turbulent dissipation rate with scalarCodedSource. I eventually implemented my own turbulence model of the k-epsilon family. This is the main modification which takes into account the possible source term: Code:
// Dissipation equation S = 0.37 G^2 / k where G is the the generation of turbulent kinetic energy computed in the sandard k-epsilon model and k is the turbulent kinetic energy. In order to do this, I added the following piece of code to fvOptions: Code:
dissipationSource Can you see any errors in the code? Thanks |
Dear Alex
How to set multiple discrete heat sources using scalarSemiImplicitSource ? |
what for solver using EEqn.C?
Quote:
just a clarification for buoyantSimpleFoam. This solver uses EEqn.C file, so you have to specify the thermal model. In case you set the following dict for thermophysicalProperties Code:
{ but if you consider a fluid with Cp = 4.186kJ/(kg*K) and rho = 1000 kg/m3, if you want to have 1W/m3 you have to set h value (q parameter [specific] ) equal to 0,000000239 Code:
q = Q = rho*Cp*T/t ==> 1/1000/4186 |
1 Attachment(s)
I performed this simple test case.
3D simulation. All patches have been set to "walls"(T=293K), but patch named "fondo" has been set to zeroGradient for T. cellZone "c0" , at the bottom (coord z=0), has 500W power source. laminar. simulation performed with openFoam v4.1 run Code:
blockMesh Code:
wallHeatFlux Code:
Time = 2.554868161131 Regards. |
Hello,
I'm trying to implement a volumetric source with scalarCodedSource. At the surface the equation: q=q0 * e^(re^2/r^2) In the depth the value q0 is described with functions. I'm using Openfoam 4.1 and the solver buoyantBoussinesqSimpleFoam. After calling the function I get this: Code:
Creating finite volume options from "constant/fvOptions" My fvOption-file looks like this: Code:
heatSource regards Chris |
Hi Chris,
I'm not too much into the scalarCodedSource fvOptions but just by looking at the error message it tells you that on line 31 of your code something is going wrong. More precisely it is in the section codeInclude (I suppose that is line 31 when looking at the entiere fvOptions file including its header. This section supposedly must be filled and cannot be left blank. As I'm not familiar with this tool I can't help you any further but maybe it helps. Regards Hannes |
Thanks for your reply.
I look into this. |
All times are GMT -4. The time now is 13:41. |