Skip to content
Snippets Groups Projects
Commit 6d06eaed authored by Adrien Crovato's avatar Adrien Crovato
Browse files

Fix steady pressure computation.

parent bdb92963
No related branches found
No related tags found
1 merge request!1USCSDPM v1.0
Pipeline #12783 passed
This commit is part of merge request !1. Comments created here will be created in the context of that merge request.
...@@ -426,9 +426,8 @@ void Solver::post(sdpmVectorXd const &etau, sdpmVectorXd const &emu) ...@@ -426,9 +426,8 @@ void Solver::post(sdpmVectorXd const &etau, sdpmVectorXd const &emu)
for (auto e : body->getElements()) for (auto e : body->getElements())
{ {
sdpmVector3d u = ui - (_tau[e->getId() - 1] * e->getCompressibleNormal() + e->computeGradient(muNodes)).cwiseQuotient(sdpmVector3d(_pbl.getCompressibility(), 1., 1.)); sdpmVector3d u = ui - (_tau[e->getId() - 1] * e->getCompressibleNormal() + e->computeGradient(muNodes)).cwiseQuotient(sdpmVector3d(_pbl.getCompressibility(), 1., 1.));
sdpmDouble cpl = 1 - u.dot(u) / ui.dot(ui); _u[e->getId() - 1] = u; // velocity
_u[e->getId() - 1] = u; // velocity _cp[e->getId() - 1] = 1 - (u.dot(u) - mi * mi * (u(0) - ui(0)) * (u(0) - ui(0))) / ui.dot(ui); // nonlinear pressure coefficient
_cp[e->getId() - 1] = cpl + 0.5 * 0.5 * cpl * cpl * mi * mi; // nonlinear pressure coefficient
} }
} }
......
...@@ -65,8 +65,8 @@ def main(): ...@@ -65,8 +65,8 @@ def main():
# test # test
tests = CTests() tests = CTests()
tests.add(CTest('CL0', sol.getLiftCoeff(), 0.258, 5e-2)) # MATLAB: 0.265 tests.add(CTest('CL0', sol.getLiftCoeff(), 0.264, 5e-2)) # MATLAB: 0.27
tests.add(CTest('CD0', sol.getDragCoeff(), -0.0029, 5e-2)) # MATLAB: -0.0033 tests.add(CTest('CD0', sol.getDragCoeff(), 0.0020, 5e-2)) # MATLAB: 0.0031
tests.add(CTest('CS0', sol.getSideforceCoeff(), 0.008, 5e-2)) tests.add(CTest('CS0', sol.getSideforceCoeff(), 0.008, 5e-2))
tests.add(CTest('CM0', sol.getMomentCoeff(), -0.079, 5e-2)) tests.add(CTest('CM0', sol.getMomentCoeff(), -0.079, 5e-2))
tests.add(CTest('Abs(CL1)', abs(sol.getUnsteadyLiftCoeff(0, 0)) / amp / math.pi, 1.54, 5e-2)) # MATLAB: 1.62 tests.add(CTest('Abs(CL1)', abs(sol.getUnsteadyLiftCoeff(0, 0)) / amp / math.pi, 1.54, 5e-2)) # MATLAB: 1.62
......
...@@ -28,7 +28,7 @@ def main(): ...@@ -28,7 +28,7 @@ def main():
pars = {'nC': 100, 'nS': 10, 'bC': 0.25, 'pS': 1.0} pars = {'nC': 100, 'nS': 10, 'bC': 0.25, 'pS': 1.0}
# flow parameters # flow parameters
aoa = 3.06 * math.pi / 180 aoa = 3.06 * math.pi / 180
minf = 0. minf = 0.839
# start timer # start timer
tms = sdpm.Timers() tms = sdpm.Timers()
...@@ -58,10 +58,10 @@ def main(): ...@@ -58,10 +58,10 @@ def main():
# test # test
tests = CTests() tests = CTests()
tests.add(CTest('CL', sol.getLiftCoeff(), 0.200, 5e-2)) # gitlab.uliege.be/am-dept/dartflo: 0.200 tests.add(CTest('CL', sol.getLiftCoeff(), 0.255, 5e-2)) # panair: 0.255
tests.add(CTest('CD', sol.getDragCoeff(), 0.003, 5e-2)) # dartflo: 0.004 tests.add(CTest('CD', sol.getDragCoeff(), 0.005, 5e-2)) # panair: 0.005
tests.add(CTest('CS', sol.getSideforceCoeff(), 0.008, 5e-2)) # dartflo: 0.011 tests.add(CTest('CS', sol.getSideforceCoeff(), 0.011, 5e-2)) # panair: 0.011
tests.add(CTest('CM', sol.getMomentCoeff(), -0.147, 5e-2)) # dartflo: -0.148 tests.add(CTest('CM', sol.getMomentCoeff(), -0.189, 5e-2)) # panair: -0.189
tests.run() tests.run()
# eof # eof
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment