-
-
March 17, 2021 at 8:59 am
youfoura
SubscriberThe laser will heat and melt the surface of steel with a temperature reaching above the evaporating temperature of the material (3000 K). Close to the evaporation temperature, the metal surface vaporizes and creates a small depression which is due to the effect of Recoil pressure (pressure acting against vaporization of steel). this recoil effect helps in Keyhole formation and aids in deeper penetration of laser weld. This effect is considered on the free surface.
During the simulation, the recoil effect is added as a momentum source in term as a volumetric force (dividing recoil pressure with gradients of volume fraction (N/m3) ) in the vapour cell when the temperature is above boiling point.
Phase considered are: steel liquid(ID 3), steel vapour(ID 4) and air(ID 2)
March 18, 2021 at 10:26 pmSurya Deb
Ansys EmployeeHello, nYou might need proper Multiphase thread looping structures in the UDF. This will allow to identify the primary vas secondary phases and then calculate the VOF gradients accordingly. nPlease check the link below. https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v211/en/flu_udf/flu_udf_UDFsForMultiphase.htmlnRegards,nSDnMarch 19, 2021 at 3:34 amYasserSelima
SubscriberThe input to define_adjust is the mixture domain ... you can't say domain = Get_domain and recall anther domain.nC_VOF(c,t) ... t must be phase thread as mentioned. You can't use C_VOF macro with mixture domain.nOne more thing, Define_adjust and Define_source are recalled every iteration ... how are you going to save data in UDMI between iterations using ON_DEMAND ??nMarch 19, 2021 at 9:42 amyoufoura
SubscriberHello, You might need proper Multiphase thread looping structures in the UDF. This will allow to identify the primary vas secondary phases and then calculate the VOF gradients accordingly. Please check the link below. https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v211/en/flu_udf/flu_udf_UDFsForMultiphase.htmlhttps://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v211/en/flu_udf/flu_udf_UDFsForMultiphase.htmlRegards,SDhttps://forum.ansys.com/discussion/comment/111535#Comment_111535
thank you for your valuable suggestion. I will modify the structure as mentioned.nMarch 19, 2021 at 9:44 amyoufoura
SubscriberThe input to define_adjust is the mixture domain ... you can't say domain = Get_domain and recall anther domain.C_VOF(c,t) ... t must be phase thread as @sdeb mentioned. You can't use C_VOF macro with mixture domain.One more thing, Define_adjust and Define_source are recalled every iteration ... how are you going to save data in UDMI between iterations using ON_DEMAND ??https://forum.ansys.com/discussion/comment/111552#Comment_111552
Thank you for the information. I will incorporate the changes as mentioned.nMarch 23, 2021 at 8:17 amyoufoura
SubscriberThe laser will heat and melt the surface of steel with a temperature reaching above the evaporating temperature of the material (3000 K). Close to the evaporation temperature, the metal surface vaporizes and creates a small depression which is due to the effect of Recoil pressure (pressure acting against vaporization of steel). this recoil effect helps in Keyhole formation and aids in deeper penetration of laser weld. This effect is considered on the free surface.During the simulation, the recoil effect is added as a momentum source in term as a volumetric force (dividing recoil pressure with gradients of volume fraction (N/m3) ) in the vapour cell when the temperature is above boiling point.Phase considered are: steel liquid(ID 3), steel vapour(ID 4) and air(ID 2)https://us.v-cdn.net/6032193/uploads/XCT42FKS13C4/recoil-pressure.jpg I have written a UDF for the mixture but it is not compiling in the solver and maybe the CODE is incomplete. Can someone help or suggest, what all things have to be added while writing the CODE for considering the gradients of volume fraction?https://us.v-cdn.net/6032193/uploads/L3OSLX6V8MQ1/image.png#include "udf.h"#include "sg.h"#include "sg_mphase.h"#include "flow.h"#include "mem.h"#include "unsteady.h"# define domain_ID 4DEFINE_ADJUST(adjust_gradient, domain){ Thread *t;cell_t c;face_t f;domain = Get_Domain(domain_ID);/* Fill UDS with the variable. */thread_loop_c (t,domain){ ttbegin_c_loop (c,t)tt{ ttC_UDSI(c,t,0) = C_VOF_G(c,t)tt}tend_c_loop (c,t)}}DEFINE_ON_DEMAND(store_gradient){Domain *domain;cell_t c;Thread *t;domain=Get_Domain(domain_ID); /* Fill the UDM with magnitude of gradient. */thread_loop_c (t,domain){tbegin_c_loop (c,t)tt{ttC_UDMI(c,t,0) = NV_MAG(C_UDSI_G(c,t,0));tt}end_c_loop (c,t)}}DEFINE_SOURCE(y_recoil,c,t,dS,eqn){treal x[ND_ND]; treal source;treal time;treal temp;ttime=RP_Get_Real("flow-time"); //Acquire time from FLUENT solvertC_CENTROID(x,c,t);ttemp=C_T(c,t); t//Acquire the face centroid locationt if (C_T(c,t) > 3000.) { source = (54715.5*exp(13.14*(temp-(2600)/temp)))*C_UDMI(c,t,0);dS[eqn] = 0; }telse { source = 0;dS[eqn]=0.0; } return source;}https://forum.ansys.com/discussion/25821/laser-welding-how-to-apply-recoil-pressure-in-the-momentum-equation
@YasserSelima, @sdeb, nThe Primary phase is assigned as air, secondary phase 1- steel liquid property and secondary phase 2- steel vapor property. I have modified the UDF. while interpreting the message shown is : line 18 (corresponding to if (FLUID_THREAD_P(t)) ..) structure reference not implemented. n#include 'udf.h'n#include 'sg.h'n#include 'sg_mphase.h'n#include 'flow.h'n#include 'mem.h'n#include 'unsteady.h'nDEFINE_ADJUST(adjust_gradient, domain)n{ntcell_t c;n Thread *t;ntThread **pt;ntint phase_domain_index = 2;ntDomain *pDomain = DOMAIN_SUB_DOMAIN(domain,phase_domain_index);ntmp_thread_loop_c (t,domain,pt)ntif (FLUID_THREAD_P(t))nt {nt Thread *tp = pt[phase_domain_index];ntbegin_c_loop (c,t)nt {n C_UDMI(c,t,0) = C_VOF_G(c,tp)[0];n C_UDMI(c,t,1) = C_VOF_G(c,tp)[1];n C_UDMI(c,t,2) = C_VOF_G(c,tp)[2];nC_UDMI(c,t,3) = sqrt(C_UDMI(c,t,0)*C_UDMI(c,t,0)+C_UDMI(c,t,1)*C_UDMI(c,t,1)+C_UDMI(c,t,2)*C_UDMI(c,t,2));nt }ntend_c_loop (c,t)n } n}nDEFINE_SOURCE(x_recoil,c,t,dS,eqn)n{ntreal x[ND_ND]; ntreal source;ntreal time;ntreal temp;nttime=RP_Get_Real('flow-time');ntC_CENTROID(x,c,t);nttemp=C_T(c,t); ntif (C_T(c,t) >= 3201.)n {ntsource = (54715.5*exp(13.14*(temp-(3201)/temp)))*(C_UDMI(c,t,0)/C_UDMI(c,t,3));n C_UDMI(c,t,4) = source;n }ntelsen {n source = 0.;n }n dS[eqn] = 0.n return source;n}nMarch 23, 2021 at 1:10 pmYasserSelima
SubscriberI am not sure what is wrong with this specific line ... but I can see later in your UDF you are requesting C_VOF with the mixture thread which will result in another errornnThere is an example in the manual, I believe DEFINE_INIT under Multiphase Looping Macros .. the example sets or initiate C_VOF ... follow the same loop structure to access C_VOFnI never used mp_thread_loop_c but I believe it requires { } as wellnMarch 24, 2021 at 9:10 amyoufoura
SubscriberOk.. Also, when I tried to remove that line the code was not compiling even though the code was intrepreting with out any error.nanyway I will check it again nViewing 7 reply threads- You must be logged in to reply to this topic.
Ansys Innovation SpaceEarth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.
Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
Trending discussions- Suppress Fluent to open with GUI while performing in journal file
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Getting graph and tabular data from result in workbench mechanical
- The solver failed with a non-zero exit code of : 2
- Difference between K-epsilon and K-omega Turbulence Model
- Time Step Size and Courant Number
- Mesh Interfaces in ANSYS FLUENT
- error in cfd post
Top Contributors-
2524
-
2066
-
1279
-
1096
-
459
Top Rated Tags© 2023 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
-