MRF in Saturne?
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
MRF in Saturne?
Hi,
is there in Saturne any possibility to have something like the multiple reference frame (MRF) to simulate a rotating fan or a stirrer inside the fluid domain?
Thanks in advance
Andrea
is there in Saturne any possibility to have something like the multiple reference frame (MRF) to simulate a rotating fan or a stirrer inside the fluid domain?
Thanks in advance
Andrea
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: MRF in Saturne?
Hello,
Yes, this is possible, using coupling between 2 instances of Code_Saturne: 1 with a fixed reference frame, the other with a rotating frame.
The current limitation is that a rotating frame's axis is only defined using a chosen direction, but must pass through the origin, so only one fan (or fans with a same axis) may be defined. This should be easy to extend (and will hopefully be extended in the coming months).
See this thread for more detailshttp://code-saturne.org/forum/viewtopic.php?f=2&t=40.
An old example for data setup is given on our old forum at https://code-saturne.info/products/code ... /961298665. The links to that old forum may soon become broken, once the threads are copied to a special section of this one (which should be soon), but I'll try not to forget to update the link here directly when that is ready. Note that the data setup is probably valid for version 2.0 of the code, so it may need to be updated.
Best regards,
Yvan
Yes, this is possible, using coupling between 2 instances of Code_Saturne: 1 with a fixed reference frame, the other with a rotating frame.
The current limitation is that a rotating frame's axis is only defined using a chosen direction, but must pass through the origin, so only one fan (or fans with a same axis) may be defined. This should be easy to extend (and will hopefully be extended in the coming months).
See this thread for more detailshttp://code-saturne.org/forum/viewtopic.php?f=2&t=40.
An old example for data setup is given on our old forum at https://code-saturne.info/products/code ... /961298665. The links to that old forum may soon become broken, once the threads are copied to a special section of this one (which should be soon), but I'll try not to forget to update the link here directly when that is ready. Note that the data setup is probably valid for version 2.0 of the code, so it may need to be updated.
Best regards,
Yvan
Re: MRF in Saturne?
thank you as always,
great, i've just tried this in saturne2.2:
code_saturne create -s mrf1 -c fluid1 -c fluid2
and i get 2 instances of saturne linked together, reading from posts i should use fluid1 as stator fluid and fluid2 as rotor fluid (the one with coriolis source). My only remaining question before trying the simulation is :
how should i set the coupled interface between this 2 fluid regions? what boundary condition should i use?
PS the genova_pump file is corrupted, i can't unzip the packet.
Andrea
great, i've just tried this in saturne2.2:
code_saturne create -s mrf1 -c fluid1 -c fluid2
and i get 2 instances of saturne linked together, reading from posts i should use fluid1 as stator fluid and fluid2 as rotor fluid (the one with coriolis source). My only remaining question before trying the simulation is :
how should i set the coupled interface between this 2 fluid regions? what boundary condition should i use?
PS the genova_pump file is corrupted, i can't unzip the packet.
Andrea
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: MRF in Saturne?
Hello,
Here is a new archive for the setup of the pump, as used for the validation from version 2.0. This setup only uses user subroutines, not an xml file, but if you look at the usini1.f90 (general options) and usclim (boundary conditions) files, and compare the usini1.f90for each directory to the one in REFERENCE/BASE, you should get an idea of how the case is setup (the tet case will be updated to use the GUI, but I am not sure this is available yet).
Best regards,
Yvan
Here is a new archive for the setup of the pump, as used for the validation from version 2.0. This setup only uses user subroutines, not an xml file, but if you look at the usini1.f90 (general options) and usclim (boundary conditions) files, and compare the usini1.f90for each directory to the one in REFERENCE/BASE, you should get an idea of how the case is setup (the tet case will be updated to use the GUI, but I am not sure this is available yet).
Best regards,
Yvan
- Attachments
-
- pump_v2.0.tar.gz
- (1.06 MiB) Downloaded 455 times
Re: MRF in Saturne?
when we add the subroutine ussatc, configured to pass the coupled faces between the 2 SRC, we have this error :
/home/andrea/studio6/RESU_COUPLING/20120515-1528/fluido1/src_saturne/ussatc.f90:63: Error: Can't open included file 'paramx.h'
gfortran -I/home/andrea/studio6/RESU_COUPLING/20120515-1528/fluido1/src_saturne -I/usr/local/include/code_saturne -x f95-cpp-input -Wall -Wno-unused -D_CS_FC_HAVE_FLUSH -O -c /home/andrea/studio6/RESU_COUPLING/20120515-1528/fluido1/src_saturne/ussatc.f90
any idea of what does it mean?
thx
/home/andrea/studio6/RESU_COUPLING/20120515-1528/fluido1/src_saturne/ussatc.f90:63: Error: Can't open included file 'paramx.h'
gfortran -I/home/andrea/studio6/RESU_COUPLING/20120515-1528/fluido1/src_saturne -I/usr/local/include/code_saturne -x f95-cpp-input -Wall -Wno-unused -D_CS_FC_HAVE_FLUSH -O -c /home/andrea/studio6/RESU_COUPLING/20120515-1528/fluido1/src_saturne/ussatc.f90
any idea of what does it mean?
thx
Re: MRF in Saturne?
probably i've found the solution using cs_user_coupling.c ; the old ussatc.f90 doesn't work with saturne 2.2. I've edited the most recent library provided in fluid1/SRC/REFERENCE/ , copying in fluid1/SRC giving
if (true)
cs_sat_coupling_define("fluid1",
"coupled_boundary",
NULL,
NULL,
"all[]",
verbosity);
and the same (with fluid2) for fluid2/SRC. Hoping it will works....
if (true)
cs_sat_coupling_define("fluid1",
"coupled_boundary",
NULL,
NULL,
"all[]",
verbosity);
and the same (with fluid2) for fluid2/SRC. Hoping it will works....
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: MRF in Saturne?
Hello,
I forgot to mention user subroutines are not compatible between versions 2.0 and 2.2. The idea was more to compare the "user" and "reference" versions of usini1f.90 (replaced by cs_user_parameters.f90 in 2.2) and of usclim.f90 (boundary conditions, replaced by cs_user_boundary_conditions.f90, or by the GUI) to see how the case is set up.
And yes, ussatc.f90 is indeed replaced by cs_user_coupling.f90.
Sorry for renaming and changing all the user subroutines, but this was done both to increase consistency, improve translations, and add functionnality. Hopefully, 2.2 is more comfortable to use than 2.0.
Best regards,
Yvan
I forgot to mention user subroutines are not compatible between versions 2.0 and 2.2. The idea was more to compare the "user" and "reference" versions of usini1f.90 (replaced by cs_user_parameters.f90 in 2.2) and of usclim.f90 (boundary conditions, replaced by cs_user_boundary_conditions.f90, or by the GUI) to see how the case is set up.
And yes, ussatc.f90 is indeed replaced by cs_user_coupling.f90.
Sorry for renaming and changing all the user subroutines, but this was done both to increase consistency, improve translations, and add functionnality. Hopefully, 2.2 is more comfortable to use than 2.0.
Best regards,
Yvan
Re: MRF in Saturne?
don't worry, i really appreciate the code and all its features, just one question because i'm taking some strange results.
if i create a case like
code_saturne create -s mrf1 -c fluid1 -c fluid2
to couple fluid1 with fluid2 in fluid1/SRC i should have the subroutine where i put in the boundary name of the coupled region and the casename of the region to wich it coupled (in this case fluid2). Right?
like this
if (true)
cs_sat_coupling_define("fluid2",
"coupled_boundary",
NULL,
NULL,
"all[]",
verbosity);
if i create a case like
code_saturne create -s mrf1 -c fluid1 -c fluid2
to couple fluid1 with fluid2 in fluid1/SRC i should have the subroutine where i put in the boundary name of the coupled region and the casename of the region to wich it coupled (in this case fluid2). Right?
like this
if (true)
cs_sat_coupling_define("fluid2",
"coupled_boundary",
NULL,
NULL,
"all[]",
verbosity);
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: MRF in Saturne?
Hello,
This is the idea, but I am not sure your arguments are correct.
The arguments to cs_sat_coupling_define() are, according to src/base/cs_sat_coupling.h:
So
seems more correct for fluid1 (the coupled boundary is both projected onto the neighboring mesh, and used as an interpolation basis for that mesh, so it appears twice).
Best regards,
Yvan
This is the idea, but I am not sure your arguments are correct.
The arguments to cs_sat_coupling_define() are, according to src/base/cs_sat_coupling.h:
Code: Select all
cs_sat_coupling_define(const char *saturne_name,
const char *boundary_cpl_criteria,
const char *volume_cpl_criteria,
const char *boundary_sup_criteria,
const char *volume_sup_criteria,
int verbosity);
Code: Select all
cs_sat_coupling_define("fluid2",
"coupled_boundary",
NULL,
"coupled_boundary",
NULL,
verbosity);
Best regards,
Yvan
Re: MRF in Saturne?
hi, if i use your configuration i get an instant error :
"LE COUPLAGE VIA LES FACES EN TANT QU'ELEMENTS SUPPORTS N'EST PAS ENCORE GERE PAR LE NOYAU. Le calcul ne peut etre execute."
If i use my configuration i get very wrong speed values (E+07) in all the domain... just can't understand what's the solution
"LE COUPLAGE VIA LES FACES EN TANT QU'ELEMENTS SUPPORTS N'EST PAS ENCORE GERE PAR LE NOYAU. Le calcul ne peut etre execute."
If i use my configuration i get very wrong speed values (E+07) in all the domain... just can't understand what's the solution