Introducing radiation BC to new solver

Discussion about coding and new developments
Post Reply
ark
Posts: 14
Joined: 02 May 2017, 15:39
Antispam: Yes

Introducing radiation BC to new solver

Post by ark »

Hi,

I am trying to write monolithic solver for heat and moisture coupled equations.
As suggested on this forum I have chosen the ThermalElectric solver as basic one.
Before introducing a new components I have started to transfer the radiation boundary condition from the HeatSolver to the ThermalElectric solver. Unfortunately the obtained temperatures in the body are 3-4 times higher than the temperatures obtained from the HeatSolver.

Could you please suggest me any origin of this differences.


Kind regards,
Arkadiusz

PS Of course the equtions of ThermalElectric solver in my file are decoupled and the first equation is heat equation as in HeatSolver.
Attachments
case.sif
(2.79 KiB) Downloaded 391 times
HeatMoistureSolve2.f90
(20.61 KiB) Downloaded 403 times
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Introducing radiation BC to new solver

Post by raback »

Hi Arkadiusz

Didn't dwell too deep into the code. However, I know that the implicit treatment of radition is somewhat peculiar. Do you want to use the "diffuse gray" radiation model? It affect the matrix structure and certainly assumes that the matrix indexes are Perm(node) whereas they for you should be 2*Perm(node)-1. Do you get reasonable results when not using radiation?

-Peter
ark
Posts: 14
Joined: 02 May 2017, 15:39
Antispam: Yes

Re: Introducing radiation BC to new solver

Post by ark »

Hi Peter,

Results for Neumann BC match perfectly between two solvers.
At the moment I do not use "diffuse gray" but transferring this feature and all features related to fluid solvers are my goal. In fact I am not sure if my strategy is good. My be if I want to have almost all benefits of Elmer HeatSolver the better strategy would be calling HeatSolver for local matrices and elaborate a global matrices assembling for the coupled equations.

I was calling Temperatres in the body by:
CALL GetVectorLocalSolution(SOL,UElement=Element)
TemperatureSOL = SOL(1,1:nd)
DO j=1,n
current Temp. on boundary = Temperature(n)

and there was a mistake (I suppose with 1:nd and don't now how to deal with Perm on this level). After your suggestion I have changed to:
TempSol => Solver % Variable
TempPerm => TempSol % Perm
Temperature => TempSol % Values
DO j=1,n
k = 2*TempPerm(Element % NodeIndexes(j))-1
current Temp. on boundary = Temperature(k)

The results from two solvers are the same. I can proceed:)
Thank you very much!

Kind regards,
Arkadiusz
Post Reply