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

How can I do a solidWallMixedVoltageCoupled patch in chtMultiRegionFoam?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   March 2, 2010, 10:23
Default How can I do a solidWallMixedVoltageCoupled patch in chtMultiRegionFoam?
  #1
New Member
 
Niklas Järvstråt
Join Date: Mar 2010
Posts: 4
Rep Power: 7
Niklas Järvstråt is on a distinguished road
Hi!
I am trying to use a very simple calculation of electric potential field solver with chtMultiRegionFoam. I can run the solver and get nice potential fields with fixed boundary conditions. However, I cannot seem to get the interface patch, solidWallMixedTemperatureCoupledFvPatchScalarField , to work.
First, I tried just assigning the electric field instead of temperature in changeDictionaryDict of the System subdirectories:

wire_to_topAir
{
type solidWallMixedTemperatureCoupled;
neighbourFieldName Vel;
sigma sigma;
value uniform 400;
}

Vel is my introduced electric potential field, and sigma the electric resistivity. The calculation starts, but soon diverges as there is no coupling.

Then I tried making a copy of solidWallMixedTemperatureCoupledFvPatchScalarField specifically for the potential field, replacing all "T" by "Vel" and all "K" by "sigma", but essentially it was just a renaming excercise as I don't understand the structure well enough.
My question is what needs to be changed in solidWallMixedTemperatureCoupledFvPatchScalarField .H(and .C) and/or the input files to couple another field than temperature?

PS
See
http://www.tfd.chalmers.se/~hani/kur...roject0126.pdf
and
http://www.tfd.chalmers.se/~hani/kur...erAndCases.tgz
for details about the problem.
Niklas Järvstråt is offline   Reply With Quote

Old   March 16, 2010, 06:13
Default Flux seems to work...
  #2
New Member
 
Niklas Järvstråt
Join Date: Mar 2010
Posts: 4
Rep Power: 7
Niklas Järvstråt is on a distinguished road
Hi Again, seems I am too vague or have an odd problem as no response so far. However, I have tried some more, running with the subroutines I made, and it seems the problem is in transferring the value of the voltage, while the flux *is* transferred in the other direction, at least somehow.
I run a simulation with homogeneous zero start voltage and only one region("wire") has one external boundary at non-zero voltage(400). The first increment all other regions voltage stays zero, while the one with a non-zero boundary reaches that boundary value homogenously. In the second increment, the neighbouring region reaches a homogeneous and ridiculously high voltage(8.3e+18), while the wire now seems to have the boundary to the surrounding region set to 200 !? (Incidentally, I used 200 there in the previous simulation, but the value was not used this time.)
Am I calling variables that have not been assigned values?

In createSolidFields I have added the lines:
PtrList<volScalarField> VSolid(solidRegions.size());
Info<< " Adding to VSolid\n" << endl;
VSolid.set
(
i,
new volScalarField
(
IOobject
(
"Vel",
runTime.timeName(),
solidRegions[i],
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
solidRegions[i]
)
);
Niklas Järvstråt is offline   Reply With Quote

Old   April 1, 2010, 05:22
Default Neighbour gradient needed?
  #3
New Member
 
Niklas Järvstråt
Join Date: Mar 2010
Posts: 4
Rep Power: 7
Niklas Järvstråt is on a distinguished road
Hi again, somebody.
It seems as if I am actually using the interface patch correctly, but the interface is highly unstable for the electric field integration. I'm now trying to implement a consistent interface patch instead, but due to my inexperience with C++ and openFOAM, I am struggling to get hold of the neighbour gradient that I need.

In the original, the gradient is assigned to the interface by
tmp<scalarField> normalGradient = (*this-intFld())*patch().deltaCoeffs();
But I do not understand what value "*this" has at this point of the code, and anyway I seem to need the gradient both in the neighbour element and in "my" element.
And anyway, should you not divide by the deltas instead of myltiplying with them to get the gradient?
Niklas Järvstråt is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using starToFoam clo OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 33 September 26, 2012 04:04
StarToFoam error Kart OpenFOAM Meshing & Mesh Conversion 1 February 4, 2010 05:38
CheckMeshbs errors ivanyao OpenFOAM Running, Solving & CFD 2 March 11, 2009 03:34
Import gmsh msh to Foam adorean Open Source Meshers: Gmsh, Netgen, CGNS, ... 24 April 27, 2005 08:19
Multicomponent fluid Andrea CFX 2 October 11, 2004 05:12


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