Heat source for microwave heating
-
- Site Admin
- Posts: 4825
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Heat source for microwave heating
Hi
Could you post the sif file. That is where everything happenns...
-Peter
Could you post the sif file. That is where everything happenns...
-Peter
-
- Posts: 2301
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Heat source for microwave heating
Removing if (mindist<=0.00001)exit
did allow to review each node and find the correct closest node.
HeatControlNode 14137
HeatControlNode Coordinate 4.0000000000000001E-002 2.2499999999999999E-002 0.10199999999999999
The sif was previously posted, but here is my copy
did allow to review each node and find the correct closest node.
HeatControlNode 14137
HeatControlNode Coordinate 4.0000000000000001E-002 2.2499999999999999E-002 0.10199999999999999
The sif was previously posted, but here is my copy
-
- Site Admin
- Posts: 4825
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Heat source for microwave heating
Hi
There is quite a bit excess computation happening. Add the following to solvers 1) and 2).
Your setup is linear. Hence rather add to Solver 3)
Otherwise your control temperature will not reflect the previous timestep but the previous iteration. For nonliner problems the F90 would need a small edit.
-Peter
There is quite a bit excess computation happening. Add the following to solvers 1) and 2).
Code: Select all
¨
Exec Solver = Before Simulation
Code: Select all
Nonlinear System Max Iterations = 1
-Peter
-
- Site Admin
- Posts: 4825
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Heat source for microwave heating
Also, you might use elemental fields and call
and instead of getting this field internally in the sif use the "DummyVariable" you have defined there directly. The treatment of elemental/nodal fields is done on library level. No need to make the F90 routine more complicated....
This is just fine tuning since we don't want the heat source to smear down at the interfaces.
-Peter
Code: Select all
Heat Source = Variable "Div Poynting Vector e re"
Real Procedure "heatsource" "heatsource"
This is just fine tuning since we don't want the heat source to smear down at the interfaces.
-Peter
-
- Posts: 2301
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Heat source for microwave heating
I tried to follow Peter's suggestions, but end in error
ERROR:: ListParseStrToVars: Can't find independent variable:[div poynting vector e re] for dependent variable:[Heat Source]
Note: The following floating-point exceptions are signalling: IEEE_DIVIDE_BY_ZERO IEEE_DENORMAL
STOP 1
ERROR:: ListParseStrToVars: Can't find independent variable:[div poynting vector e re] for dependent variable:[Heat Source]
Note: The following floating-point exceptions are signalling: IEEE_DIVIDE_BY_ZERO IEEE_DENORMAL
STOP 1
Re: Heat source for microwave heating
Dear Peter,Kevin
Elmer doesn't seem to know [div poynting vector e re], why I use [div poynting vector re].
On your advice,
I obtained this result(0.0008m Mesh).(Without a controlled temperature code, the temperature is about 1500K after 10 sec)The calculation time was 220s, and previously it was 520s.
Compared to the results of the comsol,
Kevin and I have previously concluded that"it appears the function is evaluating each element indivudually".
It can be seen that, around the control point, the temperature of Elmer is about 600K.
I used 0.0005 m Mesh(finer mesh) and result changed again.It seems that the mesh.nodes is different and the results will change. And Solver log has a warning.
I actually doubt this.Why does the REAL (KIND=dp):: Poy(not an array) can have different values at each node?
Elmer doesn't seem to know [div poynting vector e re], why I use [div poynting vector re].
On your advice,
Code: Select all
Solver 1,2
Exec Solver = Before Simulation
Solver 3
Nonlinear System Max Iterations = 1
It can be seen that, around the control point, the temperature of Elmer is about 600K.
I used 0.0005 m Mesh(finer mesh) and result changed again.It seems that the mesh.nodes is different and the results will change. And Solver log has a warning.
Code: Select all
WARNING:: SolveEquations: Numerical Error: Coupled system did not converge
Code: Select all
Poy = Poyvar % Values(Poyvar % Perm(n))
-
- Site Admin
- Posts: 4825
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Heat source for microwave heating
Hi
To compute the elemental fields with CalcFields solver say
This will give you the "e" fields and will omit the standard nodal fields.
The "Poy" is a scalar because this routine is called for each time it is needed. Hence it should be economical and only determine the control node once.
-Peter
To compute the elemental fields with CalcFields solver say
Code: Select all
Calculate Nodal Fields = False
Calculate Elemental Fields = True
The "Poy" is a scalar because this routine is called for each time it is needed. Hence it should be economical and only determine the control node once.
-Peter
Re: Heat source for microwave heating
Dear Peter,
I know why can't find the [div poynting vector e re].It should be the [div poynting vector re e].I finally know what these little squares are for. If I use
what should it be written in the udf?Neither of these calculations is correctly.
Peter,I want to try this heatsource, which in microwave heating, in general, is equivalent to div poynting vector.As long as the electric conductivity and relative permittivity im of the material is 0.
And what should it be written in the udf?That is what I did.
But Elmer can't find them.
It seems can only find[electric field e] and [electric field re e 1,2,3]
Best wishes!
Dustin
I know why can't find the [div poynting vector e re].It should be the [div poynting vector re e].I finally know what these little squares are for. If I use
Code: Select all
Heat Source = Variable "Div Poynting Vector re e"
Real Procedure "heatsource" "heatsource"
Code: Select all
Poyvar => VariableGet( Model % Mesh % Variables,'Div Poynting Vector re e')
Poyvar => VariableGet( Model % Mesh % Variables,'Div Poynting Vector re')
Code: Select all
Heat Source = Variable Electric field E
Real MATC "pi*8.8542e-12*2.45e9*20*(tx(0)^2)"+tx(1)^2+tx(2)^2+tx(3)^2+tx(4)^2+tx(5)^2)/1050"
Code: Select all
ElVar1 => VariableGet( Model % Mesh % Variables,'Electric field re E 1')
ElVar2 => VariableGet( Model % Mesh % Variables,'Electric field re E 2')
ElVar3 => VariableGet( Model % Mesh % Variables,'Electric field re E 3')
ElVar4 => VariableGet( Model % Mesh % Variables,'Electric field im E 1')
ElVar5 => VariableGet( Model % Mesh % Variables,'Electric field im E 2')
ElVar6 => VariableGet( Model % Mesh % Variables,'Electric field im E 3')
El1 = ElVar1 % Values(Elvar1 % Perm(n))
El2 = ElVar2 % Values(Elvar2 % Perm(n))
El3 = ElVar3 % Values(Elvar3 % Perm(n))
El4 = ElVar4 % Values(Elvar4 % Perm(n))
El5 = ElVar5 % Values(Elvar5 % Perm(n))
El6 = ElVar6 % Values(Elvar6 % Perm(n))
hvar = pi*8.8542e-12*2.45e9*20*(El1**2+El2**2+El3**2+El4**2+El5**2+El6**2)/1050
Code: Select all
Heat Source = Variable "Electric field e re 1,Electric field e re 2,Electric field e re 3,Electric field e im 1,Electric field e im 2,Electric field e im 3,Temperature"
Real Procedure "heatsource" "heatsource"
Code: Select all
ERROR:: ListParseStrToVars: Can't find independent variable:[electric field e re 1] for dependent variable:[Heat Source]
ERROR:: ListParseStrToVars: Can't find independent variable:[electric field e im 1] for dependent variable:[Heat Source]
ERROR:: ListParseStrToVars: Can't find independent variable:[electric field im] for dependent variable:[Heat Source]
Best wishes!
Dustin
Re: Heat source for microwave heating
Dear Peter,Kevin
I found out the reason.It is caused by parallel computing.
This is the result of the parallel computing after 10 sec.The initial mesh has to be split into parts.No wonder the grids of different sizes have different results. This is the result of the serial computing after 10 sec. So, if I still can use parallel computing?
Can I only use serial computing?
Why, in my case, the decomposed domains cannot communicate between them?
Is it because of this?
Finally control the temperature successfully, although produced a new problem.
Thank you for your help during this time. I have learned a lot about Elmer.
Thank you Peter,Kevin.
Best wishes!
Dustin
I found out the reason.It is caused by parallel computing.
This is the result of the parallel computing after 10 sec.The initial mesh has to be split into parts.No wonder the grids of different sizes have different results. This is the result of the serial computing after 10 sec. So, if I still can use parallel computing?
Can I only use serial computing?
Why, in my case, the decomposed domains cannot communicate between them?
Is it because of this?
Code: Select all
Poy = Poyvar % Values(Poyvar % Perm(n))
Thank you for your help during this time. I have learned a lot about Elmer.
Thank you Peter,Kevin.
Best wishes!
Dustin
-
- Site Admin
- Posts: 4825
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Heat source for microwave heating
Hi,
Knowing that the problem appears only in parallel is sort of essential information. When testing it is best to always start from a small serial case to ensure that problems are not due to incorrect parallel implementation.
In this case the F90 routine for finding the control node is not parallelized. One should use some MPI commands there to communicate this global value. Typically the dependencies in PDEs is just local one so this is not usually a problem. But here you need information not available in the part you're doing the computation in.
-Peter
Knowing that the problem appears only in parallel is sort of essential information. When testing it is best to always start from a small serial case to ensure that problems are not due to incorrect parallel implementation.
In this case the F90 routine for finding the control node is not parallelized. One should use some MPI commands there to communicate this global value. Typically the dependencies in PDEs is just local one so this is not usually a problem. But here you need information not available in the part you're doing the computation in.
-Peter