|
[Sponsors] | |||||
Adding an internal heat source for compressibleTwoPhaseEulerFoam |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
New Member
Join Date: Jul 2013
Posts: 14
Rep Power: 14 ![]() |
Hello dear Foamers,
I am working on the simulation of a plasma-arc-welding process and I am using the compressibleTwoPhaseEulerFoam Solver now, because it calculates the two phases (I use Argon and Air) and the temperature which I am looking for mainly. But to be exact enough I need a heat source, where the electrical current is flowing through the plasma. I would try to create a new Field "q" which would describe the increasing energy in the cells relative to the geometrical size of the cell. I found already an interesting post like this one: http://www.cfd-online.com/Forums/ope...ionfoam-2.html And this one: http://www.cfd-online.com/Forums/ope...ew-solver.html But the solver is still different. I don't have a TEqn.H. I guess I need to change the EEqn.H, but I don't know how to do it in detail. I don't know much about C++ and the "Programmers Guide" didn't enlighten me much too. My plan would be: - a readable heat source file for the Mesh [Joule/Second/m³] - accessing the volumetric size of the cells [m³] - calculating the total additional energy of the cell [Joule/Second/m³]*[m³]*[StepTimeSeconds] - subtracting it in the right part of the following equation Code:
fvScalarMatrix he1Eqn
(
fvm::ddt(alpha1, he1) + fvm::div(alphaPhi1, he1)
+ fvc::ddt(alpha1, K1) + fvc::div(alphaPhi1, K1)
// Compressibity correction
- fvm::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), he1)
- (fvc::ddt(alpha1) + fvc::div(alphaPhi1))*K1
+ (
he1.name() == "e"
? fvc::div(alphaPhi1, p)
: -dalpha1pdt
)/rho1
- fvm::laplacian(k1, he1)
==
heatTransferCoeff*(thermo2.T() - thermo1.T())/rho1
+ heatTransferCoeff*he1/Cpv1/rho1
- fvm::Sp(heatTransferCoeff/Cpv1/rho1, he1)
);
Also I attached a slice of my 3D-model. I would appreciate your help a lot. Sincerely Kenna Last edited by Kenna; September 6, 2013 at 09:47. |
|
|
|
|
|
|
|
|
#2 |
|
New Member
Join Date: Jul 2013
Posts: 14
Rep Power: 14 ![]() |
Well, so far I could create a Qp (heat flux) field with this dimensions (0, 2, -3, 0, 0, 0, 0).
I put a Qp file in the latest Time folder and put where the electric arc should be, via setFieldsDict in a cylindrical Form the value 2.14748e+09. The rest stays zero. in the createFields.H from the solver I entered this: Code:
Info<< "Reading field Qp\n" << endl;
volScalarField Qp
(
IOobject
(
"Qp",
mesh.time().timeName(),
//runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("Qp", dimensionSet(0, 2, -3, 0, 0, 0, 0), 0)
I added Qp very simple in the EEqn. Code:
fvScalarMatrix he1Eqn
(
fvm::ddt(alpha1, he1) + fvm::div(alphaPhi1, he1)
+ fvc::ddt(alpha1, K1) + fvc::div(alphaPhi1, K1)
// Compressibity correction
- fvm::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), he1)
- (fvc::ddt(alpha1) + fvc::div(alphaPhi1))*K1
+ (
he1.name() == "e"
? fvc::div(alphaPhi1, p)
: -dalpha1pdt
)/rho1
- fvm::laplacian(k1, he1)
==
heatTransferCoeff*(thermo2.T() - thermo1.T())/rho1
+ heatTransferCoeff*he1/Cpv1/rho1
- fvm::Sp(heatTransferCoeff/Cpv1/rho1, he1)
+ Qp// neu
);
Code:
dimensions [0 2 -3 0 0 0 0];
internalField nonuniformFixedValue //List<scalar>
78072
(
2.14748e+09
2.14748e+09
2.14748e+09
2.14748e+09
2.14748e+09
2.14748e+09
//etc
0
0
0
);
}
item
{
type zeroGradient;
}
//etc
Code:
dimensions [0 2 -3 0 0 0 0];
internalField uniform 0;
boundaryField
{
inlet1
{
type calculated;
value uniform 0;
}
//etc
|
|
|
|
|
|
|
|
|
#3 | |
|
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 23 ![]() |
Could you try without the red line (and the comma at the line above after "mesh").
Quote:
|
||
|
|
|
||
|
|
|
#4 |
|
New Member
Join Date: Jul 2013
Posts: 14
Rep Power: 14 ![]() |
||
|
|
|
|
![]() |
| Tags |
| heat source, solver, twophaseeulerfoam, welding |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| friction forces icoFoam | ofslcm | OpenFOAM | 3 | April 7, 2012 11:57 |
| Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 11:23 |
| how to load the heat source to wall | david yang | Main CFD Forum | 1 | October 12, 2009 14:34 |
| [Gmsh] Compiling gmshFoam with OpenFOAM-1.5 | BlGene | OpenFOAM Meshing & Mesh Conversion | 10 | August 6, 2009 05:26 |
| UDFs for Scalar Eqn - Fluid/Solid HT | Greg Perkins | FLUENT | 0 | October 14, 2000 00:03 |