How to make the additional writer active?
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 74
- Joined: Fri Aug 02, 2013 4:26 pm
How to make the additional writer active?
Dear developer and users,
I was trying to define a additional writer to outpur the results and the domain every three time step.
The following the the lines I putted in the cs_user_postprocess.c, (The subroutine is attached as well.)
/* Default writer time dependency */
fvm_writer_time_dep_t time_dep = FVM_WRITER_FIXED_MESH;
/* Default time step or physical time based output frequencies */
bool output_at_end = true;
int ntchr = -1;
double frchr = -1.0;
/* Default output format and options */
const char format_name[] = "EnSight Gold";
const char format_options[] = "";
if (true)
cs_post_define_writer(-1, /* writer_id */
"results_us", /* writer name */
"postprocessing", /* directory name */
format_name,
format_options,
time_dep,
output_at_end,
ntchr,
frchr);
/* Define additional writers */
/* ------------------------- */
if (true)
cs_post_define_writer(1, /* writer_id */
"cc", /* writer name */
"postprocessing", /* directory name */
format_name,
format_options,
time_dep,
output_at_end,
3,
frchr);
The default writer works perfectly fine. But I did not find any outcome from the additional writer.
Do you have any ideas? Do I need to modify any other subroutines to active the additional writer?
Thanks in advance,
Yu.
P.S.: I am using code_saturne 3.0.1 currently.
I was trying to define a additional writer to outpur the results and the domain every three time step.
The following the the lines I putted in the cs_user_postprocess.c, (The subroutine is attached as well.)
/* Default writer time dependency */
fvm_writer_time_dep_t time_dep = FVM_WRITER_FIXED_MESH;
/* Default time step or physical time based output frequencies */
bool output_at_end = true;
int ntchr = -1;
double frchr = -1.0;
/* Default output format and options */
const char format_name[] = "EnSight Gold";
const char format_options[] = "";
if (true)
cs_post_define_writer(-1, /* writer_id */
"results_us", /* writer name */
"postprocessing", /* directory name */
format_name,
format_options,
time_dep,
output_at_end,
ntchr,
frchr);
/* Define additional writers */
/* ------------------------- */
if (true)
cs_post_define_writer(1, /* writer_id */
"cc", /* writer name */
"postprocessing", /* directory name */
format_name,
format_options,
time_dep,
output_at_end,
3,
frchr);
The default writer works perfectly fine. But I did not find any outcome from the additional writer.
Do you have any ideas? Do I need to modify any other subroutines to active the additional writer?
Thanks in advance,
Yu.
P.S.: I am using code_saturne 3.0.1 currently.
- Attachments
-
- cs_user_postprocess.c
- (24.75 KiB) Downloaded 586 times
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: How to make the additional writer active?
Hello,
You also need to associate the writer to one or more meshes. Whether using the GUI or cs_user_postprocess.c, this is done in the postprocessing meshes definition.
Regards,
Yvan
You also need to associate the writer to one or more meshes. Whether using the GUI or cs_user_postprocess.c, this is done in the postprocessing meshes definition.
Regards,
Yvan
-
- Posts: 74
- Joined: Fri Aug 02, 2013 4:26 pm
Re: How to make the additional writer active?
Hi Yvan,
Sorry for bothering you on this topic again.
I try to save the result like 'temperautre or averaged temperature' on the boudaries.
I specified a new wirter and try to associated with the boudary of the mesh.
But it shows some followings compile errors:
/fs3/e01/e01/mep10yd/Yu_CS/scppipe/stage4_02/RESU/20141221-1401/src_saturne/cs_user_postprocess.c:450:33: error: called object is not a function or function pointer
"mesh" /* mesh name */
/fs3/e01/e01/mep10yd/Yu_CS/scppipe/stage4_02/RESU/20141221-1401/src_saturne/cs_user_postprocess.c:449:5: error: too few arguments to function 'cs_post_define_surface_mesh'
cs_post_define_surface_mesh(-2, /* mesh_id of main boundary mesh */
^
I had attached the relevant documents, can you please have a look?
The mesh name of the mesh is just 'mesh'. The name of the boundaries in my mesh is 'inlet', 'outlet', 'wall1', 'wall2', 'wall3', 'wall4'.
I can't thank enough for all of your help
Good Xmas and happy new year.
Yu.
Sorry for bothering you on this topic again.
I try to save the result like 'temperautre or averaged temperature' on the boudaries.
I specified a new wirter and try to associated with the boudary of the mesh.
But it shows some followings compile errors:
/fs3/e01/e01/mep10yd/Yu_CS/scppipe/stage4_02/RESU/20141221-1401/src_saturne/cs_user_postprocess.c:450:33: error: called object is not a function or function pointer
"mesh" /* mesh name */
/fs3/e01/e01/mep10yd/Yu_CS/scppipe/stage4_02/RESU/20141221-1401/src_saturne/cs_user_postprocess.c:449:5: error: too few arguments to function 'cs_post_define_surface_mesh'
cs_post_define_surface_mesh(-2, /* mesh_id of main boundary mesh */
^
I had attached the relevant documents, can you please have a look?
The mesh name of the mesh is just 'mesh'. The name of the boundaries in my mesh is 'inlet', 'outlet', 'wall1', 'wall2', 'wall3', 'wall4'.
I can't thank enough for all of your help
Good Xmas and happy new year.
Yu.
Yvan Fournier wrote:Hello,
You also need to associate the writer to one or more meshes. Whether using the GUI or cs_user_postprocess.c, this is done in the postprocessing meshes definition.
Regards,
Yvan
- Attachments
-
- compile.log
- (29.05 KiB) Downloaded 576 times
-
- cs_user_postprocess.c
- (24.73 KiB) Downloaded 590 times
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: How to make the additional writer active?
Hello,
On line 451 of cs_user_postprocess.c, you are missing a "," before the comment, so you have a syntax error after that.
Regards,
Yvan
On line 451 of cs_user_postprocess.c, you are missing a "," before the comment, so you have a syntax error after that.
Regards,
Yvan
-
- Posts: 74
- Joined: Fri Aug 02, 2013 4:26 pm
Re: How to make the additional writer active?
Hi Yvan,
Thanks for your correction. It did solve the compilation problem.
But the calculation was not started if I choose to turn on the definition of post-processing mesh.
It seems the mesh element of the flow domian was not included in the calculation.
Can you please have a look at my sub-routine and the listing.log? I am using code_saturne 3.0.3.
If there is some bugs in this version. Can I use the method as recording the wall shear stress? Can I get the information of wall temperature from 'clptur.f90'.
Thank for all of your help,
Yu
Thanks for your correction. It did solve the compilation problem.
But the calculation was not started if I choose to turn on the definition of post-processing mesh.
It seems the mesh element of the flow domian was not included in the calculation.
Can you please have a look at my sub-routine and the listing.log? I am using code_saturne 3.0.3.
If there is some bugs in this version. Can I use the method as recording the wall shear stress? Can I get the information of wall temperature from 'clptur.f90'.
Thank for all of your help,
Yu
Yvan Fournier wrote:Hello,
On line 451 of cs_user_postprocess.c, you are missing a "," before the comment, so you have a syntax error after that.
Regards,
Yvan
- Attachments
-
- listing.log
- (35.63 KiB) Downloaded 575 times
-
- cs_user_postprocess.c
- (25.08 KiB) Downloaded 576 times
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: How to make the additional writer active?
Hello,
Could you run with no cs_user_extra_operations.c file so as to see if you also have the error ?
Otherwise, could you run in a debug build to obtain the line numbers in the backtrace ?
Regards,
Yvan
Could you run with no cs_user_extra_operations.c file so as to see if you also have the error ?
Otherwise, could you run in a debug build to obtain the line numbers in the backtrace ?
Regards,
Yvan
-
- Posts: 74
- Joined: Fri Aug 02, 2013 4:26 pm
Re: How to make the additional writer active?
Hi Yvan,
Thanks for the reply.
But I did not include the 'cs_user_operations.c' in my simulation.
The debug build is related to the installation stage isn't it?
I am using the super computer archer. I am not sure wether I can ask them to do that or not. I will let you know if they agreed to do it.
Do you have any other solutions? Such as defined a user_array to record the boundary temperature from some subroutines?
Thanks again,
Yu.
Thanks for the reply.
But I did not include the 'cs_user_operations.c' in my simulation.
The debug build is related to the installation stage isn't it?
I am using the super computer archer. I am not sure wether I can ask them to do that or not. I will let you know if they agreed to do it.
Do you have any other solutions? Such as defined a user_array to record the boundary temperature from some subroutines?
Thanks again,
Yu.
Yvan Fournier wrote:Hello,
Could you run with no cs_user_extra_operations.c file so as to see if you also have the error ?
Otherwise, could you run in a debug build to obtain the line numbers in the backtrace ?
Regards,
Yvan
-
- Posts: 74
- Joined: Fri Aug 02, 2013 4:26 pm
Re: How to make the additional writer active?
Hi Yvan,
I just found that there is as subrouting called as 'post_boundary_temperature' and 'post_boundary_nusselt' subroutine. They are mentioned in subroutine 'use_field_parameters'. The detail show that this two subroutines may calculate the temperature and nusselts number on the wall. But I did not find the way to activated them. Do you have any idea?
Again, once I activate the subrountine. how can I get the averaged temperauture value? Do I need to do it in the 'cs_user_extra_operations'.
Thanks very much and good Xmax,
Yu.
I just found that there is as subrouting called as 'post_boundary_temperature' and 'post_boundary_nusselt' subroutine. They are mentioned in subroutine 'use_field_parameters'. The detail show that this two subroutines may calculate the temperature and nusselts number on the wall. But I did not find the way to activated them. Do you have any idea?
Again, once I activate the subrountine. how can I get the averaged temperauture value? Do I need to do it in the 'cs_user_extra_operations'.
Thanks very much and good Xmax,
Yu.
Yvan Fournier wrote:Hello,
Could you run with no cs_user_extra_operations.c file so as to see if you also have the error ?
Otherwise, could you run in a debug build to obtain the line numbers in the backtrace ?
Regards,
Yvan
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: How to make the additional writer active?
Hello,
Just "grep" the code sources and you will find those routines being called in src/base/dvvpst.f90. This constitutes an example of how they are used (but, as mentioned in cs_user_parameters.f90, you need to activate some keywords for T+ to be saved, unless you already activated the boundary temperature output with the GUI, in which case is is pre-set).
Why do you not use the GUI more ? It would make things simpler.
Also, what average temperature do you want ? Average in time, or in space ?.
Regards,
Yvan
Just "grep" the code sources and you will find those routines being called in src/base/dvvpst.f90. This constitutes an example of how they are used (but, as mentioned in cs_user_parameters.f90, you need to activate some keywords for T+ to be saved, unless you already activated the boundary temperature output with the GUI, in which case is is pre-set).
Why do you not use the GUI more ? It would make things simpler.
Also, what average temperature do you want ? Average in time, or in space ?.
Regards,
Yvan
-
- Posts: 74
- Joined: Fri Aug 02, 2013 4:26 pm
Re: How to make the additional writer active?
Hi Yvan,
Thanks for your reply. It is very helpful.
I activate the keywords for 't_plus' in the cs_user_parameters.f90. But I came across some problom on allocating the memory for the variable named as 'Var' (The so called 'Var' require 1.72E10 GB memory). I had not clue about it. The 'cs_user_parameter.f90', 'listing.log' and 'error.log' are attached. Can you please have a look.
Meanwhile, the reason that why I do not using GUI to set up the case. Because I need to use the supercomputer ARCHER located in UK to run my simulation. It does not support GUI. I do not want to ask them to update the code_saturne from V3.0.3 to V3.0.5, since it can be a time consuming procedure and my deadling is approaching.
I need to record the 'time average' temperature. Is that any possible just modify some existing subroutine in code_saturne to achieve it?
Best wishes,
Yu.
Thanks for your reply. It is very helpful.
I activate the keywords for 't_plus' in the cs_user_parameters.f90. But I came across some problom on allocating the memory for the variable named as 'Var' (The so called 'Var' require 1.72E10 GB memory). I had not clue about it. The 'cs_user_parameter.f90', 'listing.log' and 'error.log' are attached. Can you please have a look.
Meanwhile, the reason that why I do not using GUI to set up the case. Because I need to use the supercomputer ARCHER located in UK to run my simulation. It does not support GUI. I do not want to ask them to update the code_saturne from V3.0.3 to V3.0.5, since it can be a time consuming procedure and my deadling is approaching.
I need to record the 'time average' temperature. Is that any possible just modify some existing subroutine in code_saturne to achieve it?
Best wishes,
Yu.
Yvan Fournier wrote:Hello,
Just "grep" the code sources and you will find those routines being called in src/base/dvvpst.f90. This constitutes an example of how they are used (but, as mentioned in cs_user_parameters.f90, you need to activate some keywords for T+ to be saved, unless you already activated the boundary temperature output with the GUI, in which case is is pre-set).
Why do you not use the GUI more ? It would make things simpler.
Also, what average temperature do you want ? Average in time, or in space ?.
Regards,
Yvan
- Attachments
-
- cs_user_parameters.f90
- (101.67 KiB) Downloaded 580 times
-
- listing.log
- (36.47 KiB) Downloaded 564 times
-
- error.log
- (1.09 KiB) Downloaded 570 times