Page 1 of 2
ALE - mesh viscosity in v6.0
Posted: Mon Nov 04, 2019 3:55 pm
by daniele
Hello,
I have recently upgraded to v6. I have problems in correctly defining the mesh viscosity through the "new" subroutine usvima.
I select "isotropic" Inside the GUI. I am using the default usvima inside the cs_user_physical_properties.f90 of v6, where I have just added the value of the viscosity I want to use:
Code: Select all
call field_get_key_struct_var_cal_opt(ivarfl(iuma), vcopt)
idftnp = vcopt%idften
if (iand(idftnp, ISOTROPIC_DIFFUSION).ne.0) then
call field_get_val_s(ivisma, cpro_vism_s)
else if (iand(idftnp, orthotropic_diffusion).ne.0) then
call field_get_val_v(ivisma, cpro_vism_v)
endif
do iel = 1, ncel
cpro_vism_s(iel) = 0.1d0
enddo
I get the following error during the ALE initialization:
Code: Select all
Warning : Formula is null for ale. Use constant value
SIGSEGV signal (forbidden memory area access) intercepted!
Do you any idea of the problem?
Many thanks in advance.
Best regards,
Daniele
Re: ALE - mesh viscosity in v6.0
Posted: Mon Nov 04, 2019 5:09 pm
by Yvan Fournier
Hello,
Could you post the traceback ? There may be a missing entry in the XML but I am not sure.
Regards,
Yvan
Re: ALE - mesh viscosity in v6.0
Posted: Tue Nov 05, 2019 12:07 pm
by daniele
Dear Yvan,
Thank you for your help. I figured out that the problem was simply a wrong link not deleted to the v5, there was therefore an incompatibility.
Nevertheless, I still have issues in setting up my ALE simulation in v6. I followed step by step the setup I had in v5, but it seems that I have a problem with the definition of boundary condition type for some faces...:
Code: Select all
@
@ METHODE ALE
@
@ Au moins une face de bord a un type de condition a la
@ limite (icodcl) non reconnu pour la vitesse de maillage
@ selonx (iuma).
@
@ Les seules valeurs autorisees pour icodcl sont
@ 1 : Dirichlet
@ 3 : Neumann
@ 4 : Glissement
@
@
@ METHODE ALE
@
@ Au moins une face de bord a un type de condition a la
@ limite (icodcl) non reconnu pour la vitesse de maillage
@ selony (ivma).
@
@ Les seules valeurs autorisees pour icodcl sont
@ 1 : Dirichlet
@ 3 : Neumann
@ 4 : Glissement
@
@
@ METHODE ALE
@
@ Au moins une face de bord a un type de condition a la
@ limite (icodcl) non reconnu pour la vitesse de maillage
@ selonz (iwma).
@
@ Les seules valeurs autorisees pour icodcl sont
@ 1 : Dirichlet
@ 3 : Neumann
@ 4 : Glissement
@
@
@ METHODE ALE
@
@ Incoherence dans les conditions aux limites pour la vitesse
@ de maillage
@ (cf. message(s) ci-dessus)
@
@ Verifier dans l'interface ou dans usalcl.f90
@
First face with boundary condition definition error
(out of 7524)
has boundary condition type 0, center (0, 0, 0)
../../../src/base/cs_boundary_conditions.c:363: Fatal error.
All my boundary conditions are defined in terms of ALE: I impose either fixed, sliding, or internal coupling. I tried both using the GUI or the usalcl, the error is the same. Does the information "center (0,0,0)" means that the face center is located at x=0,y=0,z=0 (I have no cells in this point)? Is there a way to find out the boundary face causing the problem?
Thank you very much in advance.
Best regards,
Daniele
Re: ALE - mesh viscosity in v6.0
Posted: Tue Nov 05, 2019 1:44 pm
by Yvan Fournier
Hello,
Yes, these should be the coordinates of the face center. You may also have a graphical output of the faces in error (check ERROR.case or ERROR.med in the postprocessing output folder).
If you have none of this, can you post a simple case setup (with a small mesh) ?
Regards,
Yvan
Re: ALE - mesh viscosity in v6.0
Posted: Tue Nov 05, 2019 4:17 pm
by daniele
Hello Yvan,
I have checked the error.case, and the problem is actually the mouving boundary condition, set as "internal coupling". If I change it to "fixed velocity", the simulation runs fine. It looks strange, as if "internal coupling" of the GUI was not recognized. Is there a way to set an "internal coupling" boundary condition through the usalcl subroutine? I cannot find the corresponding bc number.
The mesh is huge, it will be complicated to share the case.
Thank you for your help.
Best regards,
Daniele
Re: ALE - mesh viscosity in v6.0
Posted: Tue Nov 05, 2019 7:46 pm
by daniele
Looking at the documentation, I have understood how to set the simulation through the cs_user_fluid_interaction.f90. I will do it and see if I can manage to avoid the problem I get when using the GUI. I will let you know as soon as I have realized the test.
Best regards,
Daniel
Re: ALE - mesh viscosity in v6.0
Posted: Wed Nov 06, 2019 11:16 am
by daniele
Hello,
I have set up the ALE simulation through the subroutines: it seems to work correctly, I don't have the boundary condition problem anymore.
Is there a way to double check the ALE boundary conditions (fixed wall, sliding, ...) defined through the cs_user_boundary_conditions-ale.f90 (I mean, be sure that everything is defined as supposed to be)?
By the way, I have tested the CDO scheme for the mesh displacement, and I obtain negative volume very soon (with the standard scheme the simulation runs fine). Am I supposed to adapt the mesh viscosity definition/values when using the CDO?
Thank you very much.
Best regards,
Daniele
Re: ALE - mesh viscosity in v6.0
Posted: Thu Nov 07, 2019 2:35 am
by Yvan Fournier
Hello,
I do not think you need to change other settings with CDO, and in our experience we usually have less negative volume issues with CDO (the geometry and boundary conditions may have a role).
Could you post at least the XML file and ALE user files ? I'll also check for the internal coupling aspects with the GUI.
Best regards,
Yvan
Re: ALE - mesh viscosity in v6.0
Posted: Thu Nov 07, 2019 3:38 pm
by daniele
Hello Yvan,
Attached you will find the xml and the ALE routines.
I am simulating a vibrating tube in a tube bundle. I set the mesh viscosity constant (with a high value) on subdomains corresponding to the tubes boundary layer, and mesh viscosity as a function of the distance in the mesh around the moving tube.
After having realized some tests, I notice that I have a SIGSEGV problem when activating the "implicit coupling" (during iteration number 3 to be precise):
Code: Select all
** DISTANCE A LA PAROI
-------------------
Distance min = 0.29308E-05 Distance max = 0.11062E+00
SIGSEGV signal (forbidden memory area access) intercepted!
Call stack:
1: 0x2ac7b0278e73 <precli_+0xdc> (libsaturne-6.0.so)
2: 0x2ac7b013abbb <condli_+0x371> (libsaturne-6.0.so)
3: 0x2ac7b029cd5d <tridim_+0x2efd> (libsaturne-6.0.so)
4: 0x2ac7b011dea2 <caltri_+0x20f2> (libsaturne-6.0.so)
5: 0x2ac7afe5b845 <cs_run+0x5f5> (libcs_solver-6.0.so)
6: 0x2ac7afe5b115 <main+0x175> (libcs_solver-6.0.so)
7: 0x2ac7b52d9b35 <__libc_start_main+0xf5> (libc.so.6)
8: 0x401749 <> (cs_solver)
End of stack
Without implicit coupling, the simulation runs fine. Moreover, decreasing the convergence value (epalim) to 1e-2 makes the simulation run ok. I am performing exactly the same simulation (with exactly the same mesh) I had already performed with v5, and in v5 I had no such issue when using implicit coupling. How do you interpret the SIGSEGV error? I don’t think it is due to a negative volume. It looks more a problem of boundary conditions....?
If the too low value of epalim (normally set to 1e-7 in my simulation) could represent a problem during the first iterations, is there a way of changing this value during the simulation? Something like:
Code: Select all
if (ttcabs.lt.t_switch) then
nalimx = 20
epalim = 1.d-2
else
nalimx = 20
epalim = 1.d-7
endif
I guess the the cs_user_parameters.f90 is only called at the beginning of the simulation, therefore using this kind of definition for epalim is useless inside the cs_user_parameters.f90.
Many thanks.
Best regards,
Daniele
Re: ALE - mesh viscosity in v6.0
Posted: Thu Jul 02, 2020 2:09 pm
by daniele
Hello,
I have tried to use the CDO approch for the ALE mesh velocity, in v6.0.2.
When I put cs_glob_ale = CS_ALE_CDO (instead of cs_glob_ale = CS_ALE_LEGACY) inside the cs_user_parameters.c, I get an error on the definition of the moving boundary conditions:
Code: Select all
../../../src/base/cs_ale.c:1414: Fatal error.
cs_ale_setup_boundaries: Boundary for ALE not allowed BC_8.
BC_8 is the internal coupling boundary condition (defined in the GUI).
Using CS_ALE_LEGACY the simulation works fine (keeping exactly the same setup).
Looking at the difference in the setup.log between the two setups (LEGACY vs CDO), I found out that with CDO a new "ghost" boundary condition is added by the code (see at the end of the setup_cdo.log attached).
Do you have an idea of the problem?
I have attached the setup.log of both cases, and the listing of the CDO simulation showing the error.
Thank you very much in advance.
Best regards,
Daniele