Skip to content

Commit

Permalink
Merge pull request #320 from ChenxiZhaoTUM/master
Browse files Browse the repository at this point in the history
add B-correction in diffusion_Neumann case and diffusion_Robin case
  • Loading branch information
Xiangyu-Hu authored Jun 11, 2023
2 parents 3199c7e + f212da3 commit 5da2f32
Show file tree
Hide file tree
Showing 23 changed files with 790 additions and 209 deletions.
2 changes: 1 addition & 1 deletion src/shared/discrete_variable/base_variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @file base_variables.h
* @brief Here gives classes for the base variables used in simulation.
* @details These variables are those discretized in spaces and time.
* @author Xiangyu Hu
* @author Chenxi Zhao and Xiangyu Hu
*/

#ifndef BASE_VARIABLES_H
Expand Down
2 changes: 1 addition & 1 deletion src/shared/particle_dynamics/base_local_dynamics.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @file base_local_dynamics.h
* @brief This is for the base classes of local particle dynamics, which describe the
* dynamics of a particle and it neighbors.
* @author Chi ZHang and Xiangyu Hu
* @author Chi Zhang, Chenxi Zhao and Xiangyu Hu
*/

#ifndef BASE_LOCAL_DYNAMICS_H
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @file diffusion_dynamics.h
* @brief This is the particle dynamics applicable for all type bodies
* TODO: there is an issue on applying corrected configuration for contact bodies..
* @author Chi Zhang and Xiangyu Hu
* @author Chi Zhang, Chenxi Zhao and Xiangyu Hu
*/

#ifndef DIFFUSION_DYNAMICS_H
Expand Down
2 changes: 1 addition & 1 deletion src/shared/particles/base_particles.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* @brief This is the base class of SPH particles. The basic data of the particles
* is saved in separated large vectors. Each derived class will introduce several extra
* vectors for the new data. Note that there is no class of single particle.
* @author Chi ZHang and Xiangyu Hu
* @author Chi Zhang, Chenxi Zhao and Xiangyu Hu
*/

#ifndef BASE_PARTICLES_H
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @file 2d_diffusion_test_with_NeumannBC.cpp
* @brief 2D diffusion test of diffusion problem with Neumann boundary condition.
* @details This is a case to implement Neumann boundary condition.
* @file diffusion_NeumannBC.cpp
* @brief 2D test of diffusion problem with Neumann boundary condition.
* @details This is the first case to validate multiple boundary conditions.
* @author Chenxi Zhao, Bo Zhang, Chi Zhang and Xiangyu Hu
*/
#include "diffusion_NeumannBC.h"
Expand Down Expand Up @@ -46,7 +46,6 @@ int main(int ac, char *av[])

ContactRelation diffusion_body_contact_Dirichlet(diffusion_body, {&wall_boundary_Dirichlet});
ContactRelation diffusion_body_contact_Neumann(diffusion_body, {&wall_boundary_Neumann});
ContactRelation wall_boundary_contact_Neumann(wall_boundary_Neumann, {&diffusion_body});

ContactRelation temperature_observer_contact(temperature_observer, {&diffusion_body});
//----------------------------------------------------------------------
Expand All @@ -61,6 +60,8 @@ int main(int ac, char *av[])
SimpleDynamics<DirichletWallBoundaryInitialCondition> setup_boundary_condition_Dirichlet(wall_boundary_Dirichlet);
SimpleDynamics<NeumannWallBoundaryInitialCondition> setup_boundary_condition_Neumann(wall_boundary_Neumann);

InteractionDynamics<solid_dynamics::CorrectConfiguration> correct_configuration(diffusion_body_inner_relation);

SimpleDynamics<NormalDirectionFromBodyShape> diffusion_body_normal_direction(diffusion_body);
SimpleDynamics<NormalDirectionFromBodyShape> wall_boundary_normal_direction(wall_boundary_Neumann);
//----------------------------------------------------------------------
Expand All @@ -77,6 +78,8 @@ int main(int ac, char *av[])
sph_system.initializeSystemCellLinkedLists();
sph_system.initializeSystemConfigurations();

correct_configuration.exec();

setup_diffusion_initial_condition.exec();

setup_boundary_condition_Dirichlet.exec();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/**
* @file 2d_diffusion_test_with_NeumannBC.h
* @brief This is the head files used by 2d_diffusion_test_with_NeumannBC.cpp.
* @file diffusion_NeumannBC.h
* @brief This is the head files used by diffusion_NeumannBC.cpp.
* @author Chenxi Zhao, Bo Zhang, Chi Zhang and Xiangyu Hu
*/
#ifndef DIFFUSION_TEST_WITH_NEUMANNBC_H
#define DIFFUSION_TEST_WITH_NEUMANNBC_H
#ifndef DIFFUSION_NEUMANNBC_H
#define DIFFUSION_NEUMANNBC_H

#include "sphinxsys.h"
using namespace SPH;
Expand Down Expand Up @@ -213,4 +213,4 @@ class TemperatureObserverParticleGenerator : public ObserverParticleGenerator
}
}
};
#endif // DIFFUSION_TEST_WITH_NEUMANNBC_H
#endif // DIFFUSION_NEUMANNBC_H
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Phi>
<Snapshot_0 Phi_0="100.00000000000003" Phi_1="99.999999999999986" Phi_2="99.999999999999986" Phi_3="99.999999999999986" Phi_4="100.00000000000001" />
<Snapshot_3030 Phi_0="192.28533881040755" Phi_1="130.20732033140075" Phi_2="137.67854723623378" Phi_3="185.08157646032703" Phi_4="253.45296282914941" />
<Snapshot_6060 Phi_0="227.01611359780398" Phi_1="166.69300381929406" Phi_2="176.25718432596037" Phi_3="217.69997661664175" Phi_4="271.16232037657818" />
<Snapshot_9090 Phi_0="262.71904369512441" Phi_1="201.48963051850623" Phi_2="207.46261832043328" Phi_3="240.40883222801202" Phi_4="282.67308365717861" />
<Snapshot_12120 Phi_0="294.86211516631096" Phi_1="232.22733179422144" Phi_2="233.80196448169443" Phi_3="258.70554980545745" Phi_4="291.73671143271787" />
<Snapshot_15150 Phi_0="322.81343728472916" Phi_1="258.82369361672505" Phi_2="256.31172919793693" Phi_3="274.1341051840551" Phi_4="299.32701558332019" />
<Snapshot_18180 Phi_0="346.89707504949132" Phi_1="281.70901308100167" Phi_2="275.61514469922878" Phi_3="287.31587419180147" Phi_4="305.79941137728741" />
<Snapshot_21210 Phi_0="367.59652923759893" Phi_1="301.37130844841278" Phi_2="292.18462099017626" Phi_3="298.61915508725434" Phi_4="311.34647941110302" />
<Snapshot_24240 Phi_0="385.37523269693531" Phi_1="318.25750227946446" Phi_2="306.41105791400616" Phi_3="308.32135600819447" Phi_4="316.10712101687528" />
<Snapshot_27270 Phi_0="400.64246874132442" Phi_1="332.75790827396685" Phi_2="318.62664578990513" Phi_3="316.6515514925581" Phi_4="320.19438752661051" />
<Snapshot_30300 Phi_0="413.75234599117067" Phi_1="345.2092197854322" Phi_2="329.11581405536293" Phi_3="323.80429673182078" Phi_4="323.70389151647174" />
<Snapshot_3030 Phi_0="242.05850324402527" Phi_1="144.91195700780736" Phi_2="145.82608419406566" Phi_3="193.56195988176523" Phi_4="264.48454450336254" />
<Snapshot_6060 Phi_0="288.0045870696926" Phi_1="191.59511097222205" Phi_2="191.75541072056674" Phi_3="229.41408947138277" Phi_4="281.59999357642033" />
<Snapshot_9090 Phi_0="332.14129007940107" Phi_1="234.11583759685215" Phi_2="228.71784797742657" Phi_3="254.98624285450109" Phi_4="293.12513110898101" />
<Snapshot_12120 Phi_0="370.6843449383494" Phi_1="270.76713999712757" Phi_2="259.58211928039668" Phi_3="275.64319250312525" Phi_4="302.28174103265633" />
<Snapshot_15150 Phi_0="403.54300379605763" Phi_1="301.91419105961609" Phi_2="285.60418995222813" Phi_3="292.91048039861244" Phi_4="309.90202907228922" />
<Snapshot_18180 Phi_0="431.39094834156117" Phi_1="328.29080270675502" Phi_2="307.59719902605838" Phi_3="307.4726685583006" Phi_4="316.3212936489079" />
<Snapshot_21210 Phi_0="454.95773717711688" Phi_1="350.60807771694391" Phi_2="326.19630785691044" Phi_3="319.78098234393832" Phi_4="321.74547857538386" />
<Snapshot_24240 Phi_0="474.89423953463807" Phi_1="369.48662025554313" Phi_2="341.92765002617006" Phi_3="330.19008458339619" Phi_4="326.33237009918338" />
<Snapshot_27270 Phi_0="491.75813382287373" Phi_1="385.45541176561744" Phi_2="355.23390830556889" Phi_3="338.99426034081392" Phi_4="330.21196340623595" />
<Snapshot_30300 Phi_0="506.02264385043281" Phi_1="398.96274793647547" Phi_2="366.48903142913952" Phi_3="346.44122536777422" Phi_4="333.49348209154471" />
</Phi>
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@
<meanvariance>
<Mean_Element>
<Snapshot_0 Phi_0="100.00000000000001" Phi_1="99.999999999999986" Phi_2="99.999999999999986" Phi_3="99.999999999999986" Phi_4="100.00000000000001" />
<Snapshot_3030 Phi_0="192.28533881040755" Phi_1="130.20732033140075" Phi_2="137.67854723623375" Phi_3="185.08157646032703" Phi_4="253.45296282914941" />
<Snapshot_6060 Phi_0="227.01611359780398" Phi_1="166.69300381929406" Phi_2="176.25718432596037" Phi_3="217.69997661664175" Phi_4="271.16232037657818" />
<Snapshot_9090 Phi_0="262.71904369512441" Phi_1="201.48963051850626" Phi_2="207.46261832043328" Phi_3="240.40883222801202" Phi_4="282.67308365717867" />
<Snapshot_12120 Phi_0="294.86211516631096" Phi_1="232.22733179422144" Phi_2="233.8019644816944" Phi_3="258.70554980545745" Phi_4="291.73671143271787" />
<Snapshot_15150 Phi_0="322.81343728472916" Phi_1="258.82369361672505" Phi_2="256.31172919793693" Phi_3="274.13410518405504" Phi_4="299.32701558332019" />
<Snapshot_18180 Phi_0="346.89707504949132" Phi_1="281.70901308100161" Phi_2="275.61514469922878" Phi_3="287.31587419180147" Phi_4="305.79941137728741" />
<Snapshot_21210 Phi_0="367.59652923759899" Phi_1="301.37130844841278" Phi_2="292.18462099017626" Phi_3="298.61915508725434" Phi_4="311.34647941110302" />
<Snapshot_24240 Phi_0="385.37523269693526" Phi_1="318.25750227946446" Phi_2="306.41105791400611" Phi_3="308.32135600819447" Phi_4="316.10712101687528" />
<Snapshot_27270 Phi_0="400.64246874132442" Phi_1="332.75790827396685" Phi_2="318.62664578990513" Phi_3="316.6515514925581" Phi_4="320.19438752661057" />
<Snapshot_30300 Phi_0="413.75234599117078" Phi_1="345.20921978543225" Phi_2="329.11581405536299" Phi_3="323.80429673182078" Phi_4="323.70389151647174" />
<Snapshot_3030 Phi_0="242.05850324402527" Phi_1="144.91195700780736" Phi_2="145.82608419406569" Phi_3="193.56195988176523" Phi_4="264.48454450336254" />
<Snapshot_6060 Phi_0="288.0045870696926" Phi_1="191.59511097222205" Phi_2="191.75541072056674" Phi_3="229.41408947138279" Phi_4="281.59999357642033" />
<Snapshot_9090 Phi_0="332.14129007940113" Phi_1="234.11583759685212" Phi_2="228.71784797742657" Phi_3="254.98624285450111" Phi_4="293.12513110898095" />
<Snapshot_12120 Phi_0="370.6843449383494" Phi_1="270.76713999712763" Phi_2="259.58211928039668" Phi_3="275.64319250312525" Phi_4="302.28174103265633" />
<Snapshot_15150 Phi_0="403.54300379605769" Phi_1="301.91419105961609" Phi_2="285.60418995222813" Phi_3="292.91048039861244" Phi_4="309.90202907228922" />
<Snapshot_18180 Phi_0="431.39094834156123" Phi_1="328.29080270675507" Phi_2="307.59719902605838" Phi_3="307.47266855830065" Phi_4="316.32129364890795" />
<Snapshot_21210 Phi_0="454.95773717711694" Phi_1="350.60807771694391" Phi_2="326.19630785691049" Phi_3="319.78098234393832" Phi_4="321.74547857538386" />
<Snapshot_24240 Phi_0="474.89423953463807" Phi_1="369.48662025554313" Phi_2="341.92765002617006" Phi_3="330.19008458339619" Phi_4="326.33237009918338" />
<Snapshot_27270 Phi_0="491.75813382287373" Phi_1="385.4554117656175" Phi_2="355.23390830556895" Phi_3="338.99426034081392" Phi_4="330.21196340623595" />
<Snapshot_30300 Phi_0="506.02264385043281" Phi_1="398.96274793647541" Phi_2="366.48903142913952" Phi_3="346.44122536777422" Phi_4="333.49348209154465" />
</Mean_Element>
<Variance_Element>
<Snapshot_0 Phi_0="1.0000000000000009" Phi_1="0.99999999999999978" Phi_2="0.99999999999999978" Phi_3="0.99999999999999978" Phi_4="1.0000000000000004" />
<Snapshot_3030 Phi_0="3.6973651521433224" Phi_1="1.6953946267884006" Phi_2="1.8955382369079856" Phi_3="3.4255189945039883" Phi_4="6.4238404366874207" />
<Snapshot_6060 Phi_0="5.1536315833051063" Phi_1="2.7786557522299185" Phi_2="3.1066595026515573" Phi_3="4.7393279818886356" Phi_4="7.3529003992010029" />
<Snapshot_9090 Phi_0="6.9021295920080696" Phi_1="4.0598071206484176" Phi_2="4.3040738000369778" Phi_3="5.7796406613236453" Phi_4="7.9904072224258345" />
<Snapshot_12120 Phi_0="8.6943666960350843" Phi_1="5.3929533632263409" Phi_2="5.4663358595499503" Phi_3="6.6928561500144017" Phi_4="8.5110308797576906" />
<Snapshot_15150 Phi_0="10.420851529158176" Phi_1="6.698970437740436" Phi_2="6.569570252443655" Phi_3="7.5149507625062597" Phi_4="8.9596662258017208" />
<Snapshot_18180 Phi_0="12.033758067789243" Phi_1="7.9359968051071981" Phi_2="7.5963707987576807" Phi_3="8.2550411562599084" Phi_4="9.3513279998695449" />
<Snapshot_21210 Phi_0="13.512720830752896" Phi_1="9.0824665555908357" Phi_2="8.5371852743172969" Phi_3="8.9173399785025662" Phi_4="9.6936630241688402" />
<Snapshot_24240 Phi_0="14.85140699762171" Phi_1="10.128783775716334" Phi_2="9.3887736411980427" Phi_3="9.5062058570731782" Phi_4="9.9923711957577428" />
<Snapshot_27270 Phi_0="16.051438775914313" Phi_1="11.072782551886574" Phi_2="10.152293940732573" Phi_3="10.02682050626442" Phi_4="10.252444580354128" />
<Snapshot_30300 Phi_0="17.119100381319754" Phi_1="11.916940542486691" Phi_2="10.831721906132426" Phi_3="10.484922258198905" Phi_4="10.478420938290773" />
<Snapshot_3030 Phi_0="5.8592318992737793" Phi_1="2.0999475283832609" Phi_2="2.1265246831374736" Phi_3="3.7466232313270091" Phi_4="6.9952074281151173" />
<Snapshot_6060 Phi_0="8.2946642173184149" Phi_1="3.6708686548458078" Phi_2="3.6770137540613241" Phi_3="5.2630824447983633" Phi_4="7.9298556382239962" />
<Snapshot_9090 Phi_0="11.03178365756089" Phi_1="5.4810225413675662" Phi_2="5.2311853983425207" Phi_3="6.501798404505462" Phi_4="8.5922342487657293" />
<Snapshot_12120 Phi_0="13.740688358237321" Phi_1="7.3314844102224122" Phi_2="6.7382876650102101" Phi_3="7.5979169573314964" Phi_4="9.1374250961733896" />
<Snapshot_15150 Phi_0="16.284695591274502" Phi_1="9.115217876318237" Phi_2="8.1569753318268408" Phi_3="8.5796549527345931" Phi_4="9.6039267623122004" />
<Snapshot_18180 Phi_0="18.609815031103153" Phi_1="10.777485114184559" Phi_2="9.4616036848676561" Phi_3="9.4539441910362605" Phi_4="10.005916081571867" />
<Snapshot_21210 Phi_0="20.698654261732262" Phi_1="12.292602416037059" Phi_2="10.640403125948033" Phi_3="10.22598766688542" Phi_4="10.352015298370279" />
<Snapshot_24240 Phi_0="22.552453874318232" Phi_1="13.652036254786394" Phi_2="11.691451785241902" Phi_3="10.902549195719038" Phi_4="10.649281577455039" />
<Snapshot_27270 Phi_0="24.182606218095543" Phi_1="14.857587445940176" Phi_2="12.619112961004936" Phi_3="11.491710854401555" Phi_4="10.903994077660133" />
<Snapshot_30300 Phi_0="25.605891608938197" Phi_1="15.917127424102372" Phi_2="13.431421015786883" Phi_3="12.002152263432492" Phi_4="11.121790259754347" />
</Variance_Element>
</meanvariance>
Loading

0 comments on commit 5da2f32

Please sign in to comment.