Skip to content

Commit bd87f37

Browse files
committed
Bidirectional exchange
1 parent 2ee2031 commit bd87f37

File tree

5 files changed

+72
-16
lines changed

5 files changed

+72
-16
lines changed

channel-transport-particles/fluid-openfoam/constant/transportProperties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@ FoamFile
88

99
transportModel Newtonian;
1010

11-
nu nu [ 0 2 -1 0 0 0 0 ] 1;
11+
nu [0 2 -1 0 0 0 0] 1.5e-05; // = air at 20°C m^2/s
12+
rho 1.2; // kg/m^3
13+
g (0 -9.81 0);
14+

channel-transport-particles/fluid-openfoam/system/controlDict

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ FoamFile
66
object controlDict;
77
}
88

9-
application pimpleFoam;
9+
application AndersonJacksonFoam;
1010

1111
startFrom startTime;
1212

channel-transport-particles/fluid-openfoam/system/fvSchemes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ gradSchemes
1818

1919
divSchemes
2020
{
21-
default none;
21+
default Gauss linear;
2222
div(phi,U) bounded Gauss upwind;
2323
div((nuEff*dev2(T(grad(U))))) Gauss linear;
2424
}

channel-transport-particles/fluid-openfoam/system/preciceDict

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ participant Fluid;
1212

1313
modules (FF);
1414

15+
FF
16+
{
17+
nameAlpha alphaSolid;
18+
nameExplicitMomentum ExplicitMomentum;
19+
nameImplicitMomentum ImplicitMomentum;
20+
};
21+
22+
1523
interfaces
1624
{
1725
Interface1
@@ -22,11 +30,15 @@ interfaces
2230

2331
readData
2432
(
33+
ImplicitMomentum
34+
ExplicitMomentum
35+
Alpha
2536
);
2637

2738
writeData
2839
(
2940
Velocity
41+
PressureGradientFull
3042
);
3143
};
32-
};
44+
};
Lines changed: 53 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,84 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
2-
<precice-configuration experimental="true">
2+
<precice-configuration experimental="True">
33
<log>
44
<sink
5-
filter="%Severity% > debug and %Rank% = 0"
5+
type="stream"
6+
output="stdout"
67
format="---[precice] %ColorizedSeverity% %Message%"
7-
enabled="true" />
8+
filter="(%Severity% > debug) and not ((%Rank% != 0))" />
89
</log>
910

10-
<profiling mode="fundamental" synchronize="false" />
11+
<profiling mode="off" />
1112

12-
<data:vector name="Velocity" />
13+
<data:scalar name="Alpha" waveform-degree="2" />
14+
<data:vector name="ExplicitMomentum" waveform-degree="2" />
15+
<data:scalar name="ImplicitMomentum" waveform-degree="2" />
16+
<data:vector name="Velocity" waveform-degree="0" />
17+
<data:vector name="PressureGradientFull" waveform-degree="0" />
1318

14-
<mesh name="Fluid-Mesh" dimensions="2">
19+
<mesh name="Fluid-Mesh" dimensions="3">
1520
<use-data name="Velocity" />
21+
<use-data name="PressureGradientFull" />
22+
<use-data name="Alpha" />
23+
<use-data name="ExplicitMomentum" />
24+
<use-data name="ImplicitMomentum" />
1625
</mesh>
1726

1827
<participant name="Fluid">
1928
<provide-mesh name="Fluid-Mesh" />
2029
<write-data name="Velocity" mesh="Fluid-Mesh" />
30+
<write-data name="PressureGradientFull" mesh="Fluid-Mesh" />
31+
<read-data name="Alpha" mesh="Fluid-Mesh" />
32+
<read-data name="ExplicitMomentum" mesh="Fluid-Mesh" />
33+
<read-data name="ImplicitMomentum" mesh="Fluid-Mesh" />
2134
</participant>
2235

2336
<participant name="Particles">
24-
<receive-mesh name="Fluid-Mesh" from="Fluid" api-access="true" />
37+
<receive-mesh name="Fluid-Mesh" from="Fluid" safety-factor="0.5" api-access="true" />
2538
<read-data name="Velocity" mesh="Fluid-Mesh" />
39+
<read-data name="PressureGradientFull" mesh="Fluid-Mesh" />
40+
<write-data name="Alpha" mesh="Fluid-Mesh" />
41+
<write-data name="ExplicitMomentum" mesh="Fluid-Mesh" />
42+
<write-data name="ImplicitMomentum" mesh="Fluid-Mesh" />
2643
<mapping:rbf-pum-direct
2744
direction="read"
2845
from="Fluid-Mesh"
2946
constraint="consistent"
3047
vertices-per-cluster="30">
31-
<basis-function:compact-polynomial-c4 support-radius="1.5" />
48+
<basis-function:compact-polynomial-c4 support-radius="0.5" />
3249
</mapping:rbf-pum-direct>
50+
<mapping:coarse-graining
51+
direction="write"
52+
to="Fluid-Mesh"
53+
constraint="conservative"
54+
radius="0.05" />
3355
</participant>
3456

3557
<m2n:sockets acceptor="Fluid" connector="Particles" exchange-directory=".." />
3658

37-
<coupling-scheme:parallel-explicit>
59+
<coupling-scheme:serial-explicit>
60+
<participants second="Fluid" first="Particles" />
3861
<time-window-size value="0.005" />
3962
<max-time value="0.25" />
40-
<participants first="Fluid" second="Particles" />
41-
<exchange data="Velocity" mesh="Fluid-Mesh" from="Fluid" to="Particles" />
42-
</coupling-scheme:parallel-explicit>
63+
<exchange data="Velocity" mesh="Fluid-Mesh" from="Fluid" to="Particles" substeps="false" />
64+
<exchange
65+
data="PressureGradientFull"
66+
mesh="Fluid-Mesh"
67+
from="Fluid"
68+
to="Particles"
69+
substeps="false" />
70+
<exchange data="Alpha" mesh="Fluid-Mesh" from="Particles" to="Fluid" substeps="true" />
71+
<exchange
72+
data="ExplicitMomentum"
73+
mesh="Fluid-Mesh"
74+
from="Particles"
75+
to="Fluid"
76+
substeps="true" />
77+
<exchange
78+
data="ImplicitMomentum"
79+
mesh="Fluid-Mesh"
80+
from="Particles"
81+
to="Fluid"
82+
substeps="true" />
83+
</coupling-scheme:serial-explicit>
4384
</precice-configuration>

0 commit comments

Comments
 (0)