Pulverized coal and slagging TUTORIAL

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Pablo
Posts: 49
Joined: Thu Sep 04, 2014 11:31 am

Pulverized coal and slagging TUTORIAL

Post by Pablo »

Hello everyone:

I have been trying to replicate the CS 3.2 tutorial "Simulating pulverized coal combustion, coal/biomass co-combustion and slagging in a furnace using the Lagrangian approach in Code_Saturrne" and I have found several troubles I would like to be helped with.

- The first part of the simulation is performed with no troubles at all (simulating the co-combustion process in order to create the eulerian frozen-field solution).
- The second part has shown me some troubles I would like to discuss:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Error 1 message:
"cs_gui_util.c:1027: Fatal error.
Invalid attribute value:
Xpath: /Code_Saturne_GUI/lagrangian/output/raw_coal_mass_fraction/@status"

Posible reason:
GUI does not fill the XML properly by default so that certain values does are not have correct "on/off" values. This can be seen if the XML file is edited and the "raw_coal_mass_fraction" parameter is looed for.

Correction:
Manually in the XML file (filling the correct value for the searched parmeter) or using the GUI by selecting and de-selecting the post-processing particles variables selection ("Calculation control" --> "Lagrangian solution control" --> "Post processing for particles" --> "Variables selection"). This will fill the parameter values firstly "on" and then "off". The lasta value should be the default parameter value as all the variables are de-selected by default.
This probably is a bug with the GUI default parameter assignment with certain parameters.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Error 2 message:

cs_gui.c:4107: Fatal error.
Error: can not find the required symbol: enthalpy

Posible reason:
Editing the "cs_gui.c" file, it seems to be a variable initialization failure, and as it also can be seen on the error file (the error is after the checkpoint read) the error might be related with the re-reading in some variable exchange process or somewhat.


Anybody has suffered this error before and can help me?



Thanks very much.
Last edited by Pablo on Wed Dec 10, 2014 9:18 am, edited 1 time in total.
Pablo
Posts: 49
Joined: Thu Sep 04, 2014 11:31 am

Re: Troubles with Pulverized coal and slagging TUTORIAL

Post by Pablo »

Although this is a self-reply, and maybe it is not the most adequate way to organize the forums, I think it could be better for an easier comprehension of the problem as well as the evolution.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Error 2:

Regarding the aforementioned error 2, this error dissapears when only one configuration file (XML) is saved in the DATA folder of the simulated CASE. I haven't found any explaination to this issue, but I guess it may be because of the program itself.

So, TIP: Save one XML configuration file per case, the coexistence of more than one XML file within the DATA folder may lead to unexpected troubles (I guess). Could someone confirm me if this has happened before?

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Error 3 message:

"fvm_to_ensight.c:3705: Fatal error
Data of dimension 5 not handled"

This error stops the simulation run, and it appears when any of the following Lagrangian post-processing variables is chosen:
- Particle temperature
- Mass of reactive coal of the coal particle
- Mass of the char of the coal particles

Possible reason:
Not found yet, any suggestion?

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
GENERAL DOUBT OF THIS TUTORIAL


There is not any post-processing guidelines regarding paragraphs 7 and 8, which it means it might be a little bit confusing to evaluate if the results are correct or not, or which variables should be evaluated, where and how...

Any suggestion of how could evaluate the deposition process when the simulation has performed (in theory) correctly?


Thanks everyone in advance.


Pablo.
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Troubles with Pulverized coal and slagging TUTORIAL

Post by Yvan Fournier »

Hello,

Which release of version 3.2 are you using (3.2.0, 3.2.1, ... ) ?

Error 2 should not appear (i.e. a similar error has not been reported before, unless you opened the "wrong" xml file (of 2) last.

I suspect the origin of error 3 is due to not splitting the 5 temperature layers, ... into different variables. I'll try to fix it within a few days (this week is very busy, as we're getting ready to branch for 4.0, so next week is a good bet).

Could you post your setup (I know it's from the tutorial, but using your slightly modified version will make it easier to reproduce errors).

Regards,

Yvan
Pablo
Posts: 49
Joined: Thu Sep 04, 2014 11:31 am

Re: Troubles with Pulverized coal and slagging TUTORIAL

Post by Pablo »

Hello Yvan:

The Code_Saturne version I am performing these simulations is 3.3

I have performed two different cases:
- CASE tutorial, according to the exact steps shown in the 3.2 tutorial.
- CASE simplified, using just one of the components (coal) of the tutorial.

I have been working on this CASE tutorial for a time, and I am always facing the same "enthaply" error, although I guess is the same error source you are talking about: the xml file. But, I hardly can identify where the problem could be. (see attached "RUN.XML" file, as well as the error log file "listing.txt")
By the way, the simplified case, which has been exactly in the same way than the tutorial case with only ONE of the fuels (Coal), is working perfectly and the same steps has been performed. (see attached "RUN02.XML")

Any suggestion? :?
Attachments
RUN02.XML
CASE: Simplified XML case
(19.23 KiB) Downloaded 267 times
listing.txt
Error listing file
(65 KiB) Downloaded 245 times
RUN.XML
CASE: Tutorial XML file
(23.69 KiB) Downloaded 254 times
Pablo
Posts: 49
Joined: Thu Sep 04, 2014 11:31 am

Re: Troubles with Pulverized coal and slagging TUTORIAL

Post by Pablo »

Hello Yvan:

I have achieved to complete the deposition model, although, to be honest, I stil does not know which was the simulation failure. I have "debugged" the XML file comparing the two-fueled simulation against the simplified-one-fuel simulation so that I could find the differences supposing there is a GUI-to-XML translation problem.

In fact, I have found several diferences (considering the inherent difference as there are different fuels within the simulations) which modification in the XML file has lead to achieve the simulation goals.

1) <thermophysical models>:
There is a velocity initialization which it has not to be defined and it has not been defined in the GUI, so, the following paragraph shoulde be ERASED. (Although it should not have a direct relation with the simulation trouble itself)

<initialization>
<formula zone_id="1">velocity[0] = 0.;
velocity[1] = 0.;
velocity[2] = 0.;</formula>
</initialization>



2) <thermal_scalar model="enthalpy">:
There is a "formula" defined in this thermal scalar model which it should not be. I guess this line might be related with the related problem, because is related with the referred enthalpy in the error log. The following paragraph should be ERASED

<formula zone_id="1">temperature = 300.;</formula>


Erasing the aforementioned parahraphs the simulation seems to run correctly although the Lagrangian results "error 3" is still present.
Is it any logic in the previous statements or am I simply lucky?

I attach the files to compare, the wrong one (ORIGRUN.XML) and the working one (RUN.XML), I hope it helps.
Attachments
ORIGRUN1.XML
Wrong XML to compare
(23.72 KiB) Downloaded 241 times
RUN.XML
Working XML
(23.54 KiB) Downloaded 275 times
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Troubles with Pulverized coal and slagging TUTORIAL

Post by Yvan Fournier »

Hello,

To avoid the "enthalpy" error, you should edit the user law for initialization, and replace temperature with enthalpy.

Still, trying this, you may have other crashes later on.

The GUI has some amount of automatic updating from 1 version of the code to another, but it is not quite complete, so rebuilding a case might be best. Even there, I encountered some GUI bugs. As version 4.0 will enter feature freeze and validation phase within a few days, we'll add this to the list of things that need to be fixed...

I fixed the postprocessing issue by moving the call to lagpvr from src/lagr/lagopt.f90 to src/lagr/lagune.f90, just after the call to lagbeg. This will be fixed in 4.0 and 3.3.3, but you can edit your sources and rebuild with this small change in the meantime.

We'll keep you updated for the rest.

Regards,

Yvan
Pablo
Posts: 49
Joined: Thu Sep 04, 2014 11:31 am

Re: Troubles with Pulverized coal and slagging TUTORIAL

Post by Pablo »

Regarding this tutorial, and analyzing its behaviour, the post-processor shows certain variables such as:

"Part_statis_weight"
"Part_bndy_mass_flux"
"Part_fouled_Xck"
"Part_fouled_diam"
...


...which are not defined (or I am not able to locate them at least :oops: ) in the sub-routines involved either in the slagging or the combustion simulation.
I have found they are defined in the XML file when the volume statistics are activated, but, I am still not able to find "how" (to see the variable dependence) or where are they defined.

So, the question is, although the defintion of a volume/boundary statistic variable is performed in the XML file (it seems), where is their behaviour laws configured (specially in the aforementioned slagging tutorial)?


Kind regards,


Pablo.
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Troubles with Pulverized coal and slagging TUTORIAL

Post by Yvan Fournier »

Hello

These options appear in "Particles and droplets tracking/Statistics/Boundaries" under the GUI.

I agree this is not a good place, as having them appear in the general "Calculation Control/Output control" would be more logical, but this improvement will probably have to wait until version 4.1 (the version 4.0 branch has been pulled, switching 4.0 from alpha to beta, and implying a feature freeze; which also means we will release a 4.0 beta with a few days, and recommend testing that instead of 3.3, as it will be better tested).

Regards,

Yvan
Pablo
Posts: 49
Joined: Thu Sep 04, 2014 11:31 am

Re: Troubles with Pulverized coal and slagging TUTORIAL

Post by Pablo »

Those options only allows to defined whether to select them or not, but I still can find where those laws are defined.

May be within the pre-defined uslag/uslag2 files for the slagging simulation?, where are them in the simulation?

Kind regards
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Troubles with Pulverized coal and slagging TUTORIAL

Post by Yvan Fournier »

Hello,

The final computation is in src/lagr/lagsta.f90, but in some cases, it is based on values saved throughout the Lagrangian particle tracking steps.

Regards,

Yvan
Post Reply