Search found 20 matches

by ywan459
Thu Apr 28, 2022 4:43 am
Forum: Installation issues
Topic: Help needed for Windows build
Replies: 3
Views: 3383

Help needed for Windows build

Hi,

I have complied my one on Windows Subsystem for Linux (Ubuntu 20.04 LTS). There is no tricky issues, just simply follow the given the code_saturne instruction. Yes user has to install some library and tools before compilation, such as bulid essential package, OpenMPI and Qt etc.. For GUI, I am ...
by ywan459
Wed Apr 13, 2022 2:38 am
Forum: code_saturne usage
Topic: Multi-processes and variable initialization
Replies: 5
Views: 4596

Re: Multi-processes and variable initialization

Hi Yvan,

I really do not want to bother you about this topic again. But I cannot really find the solution. Following the last post, I did enable the mdecoupling with code_saturne through the configuration.

Command to configure:

./configure --enable-medcoupling --with-salome=/home/App/salome ...
by ywan459
Tue Apr 12, 2022 10:55 pm
Forum: code_saturne usage
Topic: Multi-processes and variable initialization
Replies: 5
Views: 4596

Re: Multi-processes and variable initialization

Hi Yvan,

Thanks! The data were generated through medcoupling interpolation in salome. I did store all data in the order of cell id, e.g. 1st line corresponds to 1st cell. I cannot use medcoupling with code_saturne.

How to get the global cell id in this subroutine? I guess I have to read the file ...
by ywan459
Tue Apr 12, 2022 2:46 am
Forum: code_saturne usage
Topic: Multi-processes and variable initialization
Replies: 5
Views: 4596

Multi-processes and variable initialization

Hi,

I am using a user defined subroutine to read in the external spatially varying body force from external file. I was working well with 1 process. I notice that, the at the initialization stage the routine has been called the number of time which exactly equals to the number of processes. I am ...
by ywan459
Tue Mar 08, 2022 10:43 am
Forum: code_saturne usage
Topic: Spatially varying body force
Replies: 16
Views: 12400

Re: Spatially varying body force

Hi Yvan,

Thanks!

I have to give up on medcoupling with code_saturne. But I have coded the user subroutine in a different way that reads the txt file of the spatially varying body force and add it to NS equation. I found the way of interpolate the "cell value" from the nodal values through ...
by ywan459
Tue Mar 08, 2022 2:39 am
Forum: code_saturne usage
Topic: Spatially varying body force
Replies: 16
Views: 12400

Re: Spatially varying body force

Hi Yvan,
Thanks for the advise!

I have installed salome on my drive. It works fine. My OS is Windows Linux Subsystem with Ubuntu 20.14. This subsystem works well with code_saturne before. I have successfully completed a few regular CFD modelling, and results looks promising.

To configure, I have ...
by ywan459
Mon Mar 07, 2022 2:15 am
Forum: code_saturne usage
Topic: Spatially varying body force
Replies: 16
Views: 12400

Re: Spatially varying body force

Hi Yvan,

Thanks for your time!

After a few trail-error tests and read of reference codes, I moved my field declare to a different routine,


void
cs_user_model(void)
{
cs_parameters_add_variable("VectorFieldonNode", 1);
}


And the error message disappeared, the results seems fine now. Now I ...
by ywan459
Thu Mar 03, 2022 1:23 am
Forum: code_saturne usage
Topic: Spatially varying body force
Replies: 16
Views: 12400

Re: Spatially varying body force

Hi Yvan,

I think I have figured out a general workflow, the following codes are my trial setup. I would use simple example to try first, before move to the complex case. I will use 1 scalar field to define the body force universally and read out the body force in the source term.

1. define the a ...
by ywan459
Wed Mar 02, 2022 10:20 pm
Forum: code_saturne usage
Topic: Spatially varying body force
Replies: 16
Views: 12400

Re: Spatially varying body force

Yes Yvan,

You are right. I changed my code to following:



if (strcmp(f->name, "velocity") == 0) {
cs_real_3_t *_st_exp = (cs_real_3_t *)st_exp;
/* apply source terms to all cells */
for (cs_lnum_t i = 0; i < n_cells; i++) {
_st_exp[i][0] = cell_f_vol[i] * 0*cpro_rom[i];
_st_exp[i][1 ...
by ywan459
Mon Feb 28, 2022 9:46 pm
Forum: code_saturne usage
Topic: Spatially varying body force
Replies: 16
Views: 12400

Re: Spatially varying body force

Hi Yvan,

Thanks for all your helps!

I have made some progress. I have sucessfully fitted the body force data as a vector field into the med mesh file through the medcoupling interface, and my external script for data interpolation at the nodes of mesh. I found Salome's documentation is super good ...