|
[Sponsors] |
July 29, 2021, 18:13 |
Unstable solution for pulsed heat source
|
#1 |
New Member
Sergey
Join Date: Apr 2018
Posts: 16
Rep Power: 8 |
Hello!
I'm trying to simulate cooling of the pulse heater. Heating happens at high rate (819 [kW] in heater region) for a very short period of time (6 [µs]). Unfortunately, simulation stops somewhere around 3 [µs] with either exceeded maxIter or negative temperature errors. I've tried limiting minimum temperature in regions, subdividing the mesh, lowering deltaT value ... nothing seem to work. What can I do to obtain a solution to this problem? PS. Project may be run by issuing the command Code:
make solve PPPS. I it just me or scalarCodedSource does not work with MPI? |
|
July 30, 2021, 01:58 |
|
#2 |
Senior Member
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15 |
At first I would try to simulate just one pulse and understand how the physics need to be implemented.
At such a very short time, is it really necessary to have a transient solution here? Or may it be sufficient simply to add the amount of het in form of an increased temperature?
__________________
Uwe Pilz -- Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950) |
|
July 30, 2021, 05:27 |
|
#3 |
New Member
Sergey
Join Date: Apr 2018
Posts: 16
Rep Power: 8 |
I did a simulation of the model in static case with 1000 [W] of heater power (run command make setup-stationary to setup stationary solution). Everything worked fine.
I need a transient solution because I need to investigate maximum temperature in the model in time and optimize the geometry. |
|
July 30, 2021, 18:15 |
|
#4 |
New Member
Sergey
Join Date: Apr 2018
Posts: 16
Rep Power: 8 |
I seem to overcome this problem. Previously I used a separate heating region, which was uniformly heated in time. I removed this region and added Gaussian heat source:
where A may be found from There may be some mistake there because I have to adjust A. Or may be it's due to discretization. I don't know. Here's my codedSource for the heater: Code:
transientHeatSource { type scalarCodedSource; name sourceTime; active true; scalarCodedSourceCoeffs { selectionMode all; fields (h); codeInclude #{ #}; codeCorrect #{ #}; codeAddSup #{ const scalar time = mesh().time().value(); const scalarField& V = mesh_.V(); const vectorField& C = mesh_.C(); scalar xMean = 0, yMean = 0.00806, zMean = 0; scalarField& heSource = eqn.source(); const scalar sigmaX = 1e-3; const scalar sigmaY = 1e-4; const scalar sigmaZ = 1e-3; const scalar freq = 200; const scalar amp = 6.3e6 * 0.130; const scalar impulse = 6e-6; const scalar T = 1/(2*Foam::constant::mathematical::pi*freq); const scalar func = fmod(time, T) / T; const scalar duty = impulse / T; const scalar Tot = func <= duty ? amp : 0; const scalar A = 0.8 * Tot / (std::pow(2*Foam::constant::mathematical::pi, 3.0/2.0) * sigmaX * sigmaY * sigmaZ); scalar heSourceTot = 0; forAll (heSource, i) { scalar x = -std::pow((C[i].x() - xMean) / sigmaX, 2) / 2.0; scalar y = -std::pow((C[i].y() - yMean) / sigmaY, 2) / 2.0; scalar z = -std::pow((C[i].z() - zMean) / sigmaZ, 2) / 2.0; heSource[i] -= A * V[i] * std::exp(x + y + z); heSourceTot -= heSource[i]; } Pout<< "Adding heat source: " << heSourceTot << " [W] " \ " " << heSource.size() << " with center at (" << xMean << ";" << yMean << ";" << zMean << ")" << endl; #}; codeConstrain #{ #}; } } |
|
August 1, 2021, 08:10 |
|
#5 |
Member
Eren
Join Date: Aug 2018
Posts: 86
Rep Power: 9 |
AdjustableTimeStep seems active but you didn't spesify maxCo and maxDT. First, I would disable adjustableTimeStep and run, if it doesn't work lower the dt again etc.
Also, your first timestep is 5e-7 but your timePresicion is 1e-6. You might wanna lower that too. |
|
August 1, 2021, 08:37 |
|
#6 | |
New Member
Sergey
Join Date: Apr 2018
Posts: 16
Rep Power: 8 |
Quote:
I ended up disabling it completely and doing a timestep. Otherwise simulation may skip my heat source pulse. |
||
August 1, 2021, 14:42 |
|
#7 |
Member
Eren
Join Date: Aug 2018
Posts: 86
Rep Power: 9 |
Well, by using 1e-6 you'll get a trapezoidal'ish wave, if you need sinusodal wave you might wanna lower it.
|
|
August 1, 2021, 15:35 |
|
#8 |
New Member
Sergey
Join Date: Apr 2018
Posts: 16
Rep Power: 8 |
||
Tags |
chtmultiregionfoam, heating, scalarcodedsource, stability problem |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SU2 7.0.7 Built on CentOS 7, parallel computation pyscript mpi exit error? | EternalSeekerX | SU2 | 3 | October 9, 2020 19:28 |
[Other] How to use finite area method in official OpenFOAM 2.2.0? | Detian Liu | OpenFOAM Meshing & Mesh Conversion | 4 | November 3, 2015 04:04 |
[swak4Foam] build problem swak4Foam OF 2.2.0 | mcathela | OpenFOAM Community Contributions | 14 | April 23, 2013 14:59 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |