More rheo pressure EOS, allow variable cs
This commit is contained in:
@ -97,6 +97,9 @@ void ComputeRHEOInterface::init()
|
||||
auto fixes = modify->get_fix_by_style("rheo/pressure");
|
||||
fix_pressure = dynamic_cast<FixRHEOPressure *>(fixes[0]);
|
||||
|
||||
if (!fix_pressure->invertable_pressure)
|
||||
error->all(FLERR, "RHEO interface reconstruction incompatible with pressure equation of state");
|
||||
|
||||
neighbor->add_request(this, NeighConst::REQ_DEFAULT);
|
||||
}
|
||||
|
||||
@ -178,7 +181,7 @@ void ComputeRHEOInterface::compute_peratom()
|
||||
dot = 0;
|
||||
for (a = 0; a < 3; a++) dot += (-fp_store[j][a] + fp_store[i][a]) * dx[a];
|
||||
|
||||
rho[i] += w * (fix_pressure->calc_pressure(rho[j], jtype) - rho[j] * dot);
|
||||
rho[i] += w * (fix_pressure->calc_pressure(rho[j], j) - rho[j] * dot);
|
||||
normwf[i] += w;
|
||||
}
|
||||
}
|
||||
@ -192,7 +195,7 @@ void ComputeRHEOInterface::compute_peratom()
|
||||
dot = 0;
|
||||
for (a = 0; a < 3; a++) dot += (-fp_store[i][a] + fp_store[j][a]) * dx[a];
|
||||
|
||||
rho[j] += w * (fix_pressure->calc_pressure(rho[i], itype) + rho[i] * dot);
|
||||
rho[j] += w * (fix_pressure->calc_pressure(rho[i], i) + rho[i] * dot);
|
||||
normwf[j] += w;
|
||||
}
|
||||
}
|
||||
@ -210,7 +213,7 @@ void ComputeRHEOInterface::compute_peratom()
|
||||
if (status[i] & PHASECHECK) {
|
||||
if (normwf[i] != 0.0) {
|
||||
// Stores rho for solid particles 1+Pw in Adami Adams 2012
|
||||
rho[i] = MAX(EPSILON, fix_pressure->calc_rho(rho[i] / normwf[i], type[i]));
|
||||
rho[i] = MAX(EPSILON, fix_pressure->calc_rho(rho[i] / normwf[i], i));
|
||||
} else {
|
||||
rho[i] = rho0[itype];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user